so we can use exported targets like "Python3::Python", which is defined
only if CMAKE_ROLE is "PROJECT". but this global property was introduced
by CMake 3.14, but the minimum required version of CMake is 3.10.2 in
Ceph project at this moment. let's set it if it's not defined.
Signed-off-by: Kefu Chai <kchai@redhat.com>
endif()
get_property(_${_PYTHON_PREFIX}_CMAKE_ROLE GLOBAL PROPERTY CMAKE_ROLE)
+if (NOT DEFINED _${_PYTHON_PREFIX}_CMAKE_ROLE)
+ # CMake 3.14 introduced CMAKE_ROLE
+ set(_${_PYTHON_PREFIX}_CMAKE_ROLE "PROJECT")
+endif()
#