diff --git a/CMakeLists.txt b/CMakeLists.txt index b400ad8..9ad8408 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,7 +184,10 @@ ELSE() # ############################################################################## # REQUIREMENTS # # ############################################################################## - FIND_PACKAGE(Python3 COMPONENTS Development.Module NumPy REQUIRED) + FIND_PACKAGE(Python3 COMPONENTS Development NumPy QUIET) + IF (NOT Python3_FOUND) + FIND_PACKAGE(Python3 COMPONENTS Development.Module NumPy REQUIRED) + ENDIF() # Needed to ensure the same Python executable is found by Pybind11 IF (NOT DEFINED PYTHON_EXECUTABLE) diff --git a/cmake/carmaDependencyTargets.cmake b/cmake/carmaDependencyTargets.cmake index 76e0ce0..080f929 100644 --- a/cmake/carmaDependencyTargets.cmake +++ b/cmake/carmaDependencyTargets.cmake @@ -3,9 +3,15 @@ # ############################################################################## # Python and Numpy dependencies IF (carma_FIND_REQUIRED) - FIND_PACKAGE(Python3 COMPONENTS Interpreter Development NumPy REQUIRED) + FIND_PACKAGE(Python3 COMPONENTS Development NumPy QUIET) + IF (NOT Python3_FOUND) + FIND_PACKAGE(Python3 COMPONENTS Development.Module NumPy REQUIRED) + ENDIF() ELSE () - FIND_PACKAGE(Python3 COMPONENTS Interpreter Development NumPy) + FIND_PACKAGE(Python3 COMPONENTS Development NumPy QUIET) + IF (NOT Python3_FOUND) + FIND_PACKAGE(Python3 COMPONENTS Development.Module NumPy) + ENDIF() ENDIF () IF (Python3_FOUND) LIST(APPEND carma_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})