From f2de73861ddf0464564e0d36ece4c95f6f37b83e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 8 Dec 2023 23:36:10 +0100 Subject: [PATCH 1/4] CMake: clean --- CMakeLists.txt | 6 ------ python/CMakeLists.txt | 8 ++------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f51af3c..667fe31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,16 +47,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_PROXQP) - find_package(proxsuite REQUIRED) add_project_dependency(proxsuite REQUIRED) add_definitions(-DMIM_SOLVERS_WITH_PROXQP) endif() @@ -64,10 +60,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/python/CMakeLists.txt b/python/CMakeLists.txt index 88e469e..be2ca3e 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,4 +1,3 @@ -include("../cmake/python-helpers.cmake") if(GENERATE_PYTHON_STUBS) include(${PROJECT_SOURCE_DIR}/cmake/stubs.cmake) endif(GENERATE_PYTHON_STUBS) @@ -13,12 +12,9 @@ set(${PY_NAME}_SOURCES ) add_library(${PY_NAME}_pywrap SHARED ${${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}) @@ -31,8 +27,8 @@ 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) + GET_RELATIVE_RPATH(${PYLIB_INSTALL_DIR} PYLIB_RPATH) SET_TARGET_PROPERTIES(${${PY_NAME}_pywrap} PROPERTIES INSTALL_RPATH ${PYLIB_RPATH}) ENDIF() From de72bfdf32dd2e449e2614a464fab8cddad8c2ae Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sat, 9 Dec 2023 17:12:56 +0100 Subject: [PATCH 2/4] fix RPATH --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index be2ca3e..fe706ea 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -29,7 +29,7 @@ set(${PY_NAME}_PYTHON mim_solvers/__init__.py) SET(PYLIB_INSTALL_DIR ${PYTHON_SITELIB}/mim_solvers) IF(UNIX) GET_RELATIVE_RPATH(${PYLIB_INSTALL_DIR} PYLIB_RPATH) - SET_TARGET_PROPERTIES(${${PY_NAME}_pywrap} PROPERTIES INSTALL_RPATH ${PYLIB_RPATH}) + SET_TARGET_PROPERTIES(${PY_NAME}_pywrap PROPERTIES INSTALL_RPATH ${PYLIB_RPATH}) ENDIF() install(TARGETS ${PY_NAME}_pywrap LIBRARY DESTINATION ${PYLIB_INSTALL_DIR}) From 1267c75f2d7eed7fa86cca32d2062234e75767cd Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sun, 10 Dec 2023 12:11:13 +0100 Subject: [PATCH 3/4] CMake: sync submodule --- cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake b/cmake index 9a0e73f..59a8466 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 9a0e73fdc9e635bec17ea67cdab0bd24611a1d4b +Subproject commit 59a8466a1143e2719b598b55d92a09d653628959 From 9b51ea68421d01ff9bee6f3111c86746f230e0ea Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sun, 10 Dec 2023 12:12:05 +0100 Subject: [PATCH 4/4] CMake: more clean --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 667fe31..6ecd25c 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