diff --git a/CMakeLists.txt b/CMakeLists.txt index 61f9ee7..c709500 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,10 +36,8 @@ COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX) project(${PROJECT_NAME} ${PROJECT_ARGS}) include(${CMAKE_CURRENT_LIST_DIR}/cmake/boost.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/cmake/python.cmake) include(${CMAKE_CURRENT_LIST_DIR}/cmake/apple.cmake) include(${CMAKE_CURRENT_LIST_DIR}/cmake/ide.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/cmake/python-helpers.cmake) include(CMakeDependentOption) # If needed, fix CMake policy for APPLE systems @@ -47,16 +45,12 @@ APPLY_DEFAULT_APPLE_CONFIGURATION() # Project dependencies find_package(Boost REQUIRED COMPONENTS unit_test_framework) -find_package(crocoddyl REQUIRED) -find_package(eigenpy REQUIRED) - add_project_dependency(crocoddyl 2.0.0 REQUIRED) add_project_dependency(eigenpy 2.7.10 REQUIRED) add_project_dependency(example-robot-data 4.0.7 REQUIRED PKG_CONFIG_REQUIRES "example-robot-data >= 4.0.7") if(BUILD_WITH_PROXSUITE) - find_package(proxsuite REQUIRED) add_project_dependency(proxsuite REQUIRED) add_definitions(-DMIM_SOLVERS_WITH_PROXQP) endif() @@ -64,10 +58,8 @@ endif() find_package(OpenMP REQUIRED COMPONENTS CXX) if(BUILD_PYTHON_INTERFACE) - FINDPYTHON() string(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME}) set(${PY_NAME}_INSTALL_DIR ${PYTHON_SITELIB}/${PY_NAME}) - SEARCH_FOR_BOOST_PYTHON() endif() # Main Library diff --git a/cmake b/cmake index 9a0e73f..59a8466 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 9a0e73fdc9e635bec17ea67cdab0bd24611a1d4b +Subproject commit 59a8466a1143e2719b598b55d92a09d653628959 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 37e1c72..759b0fa 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,5 +1,3 @@ -include("../cmake/python-helpers.cmake") - if(GENERATE_PYTHON_STUBS) include(${PROJECT_SOURCE_DIR}/cmake/stubs.cmake) endif(GENERATE_PYTHON_STUBS) @@ -17,12 +15,9 @@ if(BUILD_WITH_PROXSUITE) endif(BUILD_WITH_PROXSUITE) add_library(${PY_NAME}_pywrap MODULE ${${PY_NAME}_SOURCES}) -MODERNIZE_TARGET_LINK_LIBRARIES(${PY_NAME}_pywrap SCOPE PUBLIC TARGETS eigenpy::eigenpy) -target_link_libraries(${PY_NAME}_pywrap PUBLIC ${PROJECT_NAME}) -target_link_libraries(${PY_NAME}_pywrap PUBLIC crocoddyl::crocoddyl) +target_link_libraries(${PY_NAME}_pywrap PUBLIC ${PROJECT_NAME} eigenpy::eigenpy) set_target_properties(${PY_NAME}_pywrap PROPERTIES - INSTALL_RPATH "\$ORIGIN/../../.." LIBRARY_OUTPUT_DIRECTORY ${PY_NAME}_pywrap PREFIX "" SUFFIX ${PYTHON_EXT_SUFFIX}) @@ -35,9 +30,9 @@ endif(GENERATE_PYTHON_STUBS) set(${PY_NAME}_PYTHON mim_solvers/__init__.py) SET(PYLIB_INSTALL_DIR ${PYTHON_SITELIB}/mim_solvers) -GET_RELATIVE_RPATH(${PYLIB_INSTALL_DIR} PYLIB_RPATH) IF(UNIX) - SET_TARGET_PROPERTIES(${${PY_NAME}_pywrap} PROPERTIES INSTALL_RPATH ${PYLIB_RPATH}) + GET_RELATIVE_RPATH(${PYLIB_INSTALL_DIR} PYLIB_RPATH) + SET_TARGET_PROPERTIES(${PY_NAME}_pywrap PROPERTIES INSTALL_RPATH ${PYLIB_RPATH}) ENDIF() install(TARGETS ${PY_NAME}_pywrap LIBRARY DESTINATION ${PYLIB_INSTALL_DIR})