--- a/cpp/cmake_modules/FindPython3Alt.cmake +++ b/cpp/cmake_modules/FindPython3Alt.cmake @@ -23,6 +23,7 @@ # - PYTHON_OTHER_LIBS # - NUMPY_INCLUDE_DIRS +if(FALSE) # Need CMake 3.15 or later for Python3_FIND_STRATEGY if(${CMAKE_VERSION} VERSION_LESS "3.15.0") # Use deprecated Python- and NumPy-finding code @@ -69,6 +70,7 @@ set(PYTHON_OTHER_LIBS) get_target_property(NUMPY_INCLUDE_DIRS Python3::NumPy INTERFACE_INCLUDE_DIRECTORIES) +endif(FALSE) # CMake's python3_add_library() doesn't apply the required extension suffix, # detect it ourselves. @@ -94,5 +96,6 @@ set_target_properties(${name} PROPERTIES SUFFIX ${_EXT_SUFFIX}) endfunction() +include(FindPackageHandleStandardArgs) find_package_handle_standard_args( Python3Alt REQUIRED_VARS PYTHON_EXECUTABLE PYTHON_INCLUDE_DIRS NUMPY_INCLUDE_DIRS)