From 94b566a86092d05e9dc8688ffe81fe1eddcc8fca Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Fri, 15 Mar 2024 11:35:41 -0700 Subject: [PATCH] w2 --- cmake/DARTConfig.cmake.in | 3 +++ cmake/dart_v7_defs.cmake | 6 +++--- python/dartpy/CMakeLists.txt | 9 ++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmake/DARTConfig.cmake.in b/cmake/DARTConfig.cmake.in index 552fa293fd2aa..84dfda8b57cb3 100644 --- a/cmake/DARTConfig.cmake.in +++ b/cmake/DARTConfig.cmake.in @@ -143,6 +143,9 @@ endfunction() list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +# TODO: Improve the include mechanism +include(dart_v7Targets) + # Default component: dart list(APPEND @PROJECT_NAME_UPPERCASE@_FIND_COMPONENTS dart) diff --git a/cmake/dart_v7_defs.cmake b/cmake/dart_v7_defs.cmake index ab6ac15f2f0a1..4ab5adfdb5495 100644 --- a/cmake/dart_v7_defs.cmake +++ b/cmake/dart_v7_defs.cmake @@ -81,16 +81,16 @@ function(dart_library) install( TARGETS ${_ARG_NAME} - EXPORT ${_ARG_NAME}Targets + EXPORT dart_${_ARG_NAME}Targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install( - EXPORT ${_ARG_NAME}Targets + EXPORT dart_${_ARG_NAME}Targets NAMESPACE DART:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${_ARG_NAME} + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake ) endfunction() \ No newline at end of file diff --git a/python/dartpy/CMakeLists.txt b/python/dartpy/CMakeLists.txt index 350b49df23042..8eec042741eda 100644 --- a/python/dartpy/CMakeLists.txt +++ b/python/dartpy/CMakeLists.txt @@ -92,12 +92,11 @@ if(BUILD_SHARED_LIBS) ) endif() +# TODO: Fix installing dartpy to site-packages directory # Install the pybind module to site-packages directory -if(TARGET ${pybind_module}) - install(TARGETS ${pybind_module} - LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}" - ) -endif() +# install(TARGETS ${pybind_module} +# LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}" +# ) list(REMOVE_ITEM dartpy_headers ${CMAKE_CURRENT_LIST_DIR}/eigen_geometry_pybind.h