We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66e8572 commit 45d54b6Copy full SHA for 45d54b6
CMakeLists.txt
@@ -893,7 +893,13 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
893
endif()
894
895
find_package(Python2 COMPONENTS Interpreter REQUIRED)
896
-find_package(Python3 COMPONENTS Interpreter REQUIRED)
+find_package(Python3 COMPONENTS Interpreter)
897
+if(NOT Python3_Interpreter_FOUND)
898
+ message(WARNING "Python3 not found, using python2 as a fallback")
899
+ add_executable(Python3::Interpreter IMPORTED)
900
+ set_target_properties(Python3::Interpreter PROPERTIES
901
+ IMPORTED_LOCATION ${Python2_EXECUTABLE})
902
+endif()
903
904
#
905
# Find optional dependencies.
0 commit comments