Skip to content

Commit 37ebcd1

Browse files
Set it back on, drop older FindPython mode
1 parent ce67abf commit 37ebcd1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.13)
22
cmake_policy(SET CMP0074 NEW)
33
set(CMAKE_VERBOSE_MAKEFILE ON)
44

5-
if (DEFINED Python_EXECUTABLE)
6-
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
7-
endif ()
8-
95
if (DEFINED ENV{VCPKG_ROOT_DIR} AND NOT DEFINED VCPKG_ROOT_DIR)
106
set(VCPKG_ROOT_DIR "$ENV{VCPKG_ROOT_DIR}"
117
CACHE STRING "Vcpkg root directory")
@@ -36,6 +32,7 @@ endif ()
3632
# casadi seems to compile without the newer versions of std::string
3733
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)
3834

35+
set(PYBIND11_FINDPYTHON ON)
3936
find_package(pybind11 CONFIG REQUIRED)
4037

4138
# Check Casadi build flag
@@ -106,7 +103,7 @@ if (CASADI_DIR)
106103
file(TO_CMAKE_PATH ${CASADI_DIR} CASADI_DIR)
107104
message("Found Python casadi path: ${CASADI_DIR}")
108105
else ()
109-
message(FATAL_ERROR "Did not find casadi path}")
106+
message(FATAL_ERROR "Did not find casadi path")
110107
endif ()
111108

112109
if (${USE_PYTHON_CASADI})

0 commit comments

Comments
 (0)