diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f22cf518ce0e794227cb4fa595b21b569a40c1b..2577747bb84050771e9e76c5e8f48f61b3d0e27d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,12 @@ file(GLOB_RECURSE RES_FILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/resources/* ) -include(FindPythonInterp) +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") + include(FindPython3) + find_package (Python3 COMPONENTS Interpreter) +else() + include(FindPythonInterp) +endif() execute_process( COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/gen-resources.py WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}