Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 151fb6f

Browse files
committed
CMake: fix python detection for eigenpy 2.7.12
1 parent 9ee993b commit 151fb6f

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

CMakeLists.txt

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,29 @@ set(DOXYGEN_USE_MATHJAX YES)
2525
include(cmake/base.cmake)
2626
include(cmake/boost.cmake)
2727
include(cmake/lapack.cmake)
28-
include(cmake/python.cmake)
2928

3029
# Project definition
3130
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
3231
project(${PROJECT_NAME} ${PROJECT_ARGS})
3332

3433
# Project dependencies
34+
if(BUILD_PYTHON_INTERFACE)
35+
add_project_dependency(dynamic-graph-python 4.0.0 REQUIRED)
36+
string(REGEX REPLACE "-" "_" PYTHON_DIR ${CUSTOM_HEADER_DIR})
37+
endif(BUILD_PYTHON_INTERFACE)
38+
3539
add_project_dependency(sot-tools REQUIRED)
3640

3741
if(BUILD_TESTING)
3842
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
3943
add_project_dependency(example-robot-data 3.8.0 REQUIRED)
4044
endif(BUILD_TESTING)
4145

42-
if(BUILD_PYTHON_INTERFACE)
43-
findpython()
44-
search_for_boost_python(REQUIRED)
45-
string(REGEX REPLACE "-" "_" PYTHON_DIR ${CUSTOM_HEADER_DIR})
46-
add_project_dependency(dynamic-graph-python 4.0.0 REQUIRED)
47-
48-
if(Boost_VERSION GREATER 107299)
49-
# Silence a warning about a deprecated use of boost bind by boost python at
50-
# least fo boost 1.73 to 1.75
51-
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
52-
endif()
53-
endif(BUILD_PYTHON_INTERFACE)
46+
if(Boost_VERSION GREATER 107299)
47+
# Silence a warning about a deprecated use of boost bind by boost python at
48+
# least fo boost 1.73 to 1.75
49+
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
50+
endif()
5451

5552
# Main Library
5653
set(${PROJECT_NAME}_HEADERS

0 commit comments

Comments
 (0)