diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f66ecb..10018c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ endif () if (NOT DEFINED ortools_REF) message(FATAL_ERROR "ortools_REF is not defined") endif () +find_package (Python REQUIRED) FetchContent_Declare(ortools GIT_REPOSITORY ${ortools_REPO} GIT_TAG ${ortools_REF} @@ -20,7 +21,7 @@ FetchContent_Declare(ortools ${CMAKE_CURRENT_SOURCE_DIR}/patch_utils.py ${CMAKE_CURRENT_SOURCE_DIR}/ortools ${CMAKE_CURRENT_SOURCE_DIR}/patchs - . && python patch.py + . && ${PYTHON_EXECUTABLE} patch.py OVERRIDE_FIND_PACKAGE ON ) message("BUILD_DEPS: " ${BUILD_DEPS}) diff --git a/patch.py b/patch.py index b37f7c5..7af5907 100644 --- a/patch.py +++ b/patch.py @@ -38,7 +38,7 @@ # add the USE_SIRIUS configuration flag in deps.cmake full_patch.append(Addition( - Path.cwd()/'cmake'/'deps.cmake', + Path.cwd()/'cmake'/'system_deps.cmake', ''' if(USE_CPLEX) find_package(CPLEX REQUIRED)