From 8fb3a364b6817f528e6b8fabedc09a721f6b4b77 Mon Sep 17 00:00:00 2001 From: "k.koide" Date: Tue, 16 Jul 2024 09:36:16 +0900 Subject: [PATCH] install FindGTSAM.cmake --- CMakeLists.txt | 3 ++- cmake/gtsam_points-config.cmake.in | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b8b6621..d81880cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,7 +249,7 @@ if(BUILD_TESTS) include(FetchContent) FetchContent_Declare( googletest - URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip + URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip ) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) @@ -310,5 +310,6 @@ write_basic_package_version_file( install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtsam_points-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/gtsam_points-config-version.cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindGTSAM.cmake" DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} ) diff --git a/cmake/gtsam_points-config.cmake.in b/cmake/gtsam_points-config.cmake.in index dcadead6..bb9fdc54 100644 --- a/cmake/gtsam_points-config.cmake.in +++ b/cmake/gtsam_points-config.cmake.in @@ -11,6 +11,9 @@ include_guard() set(BUILD_WITH_CUDA @BUILD_WITH_CUDA@) +get_filename_component(gtsam_points_CURRENT_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${gtsam_points_CURRENT_CONFIG_DIR}") + include(CMakeFindDependencyMacro) find_dependency(Eigen3 REQUIRED) find_dependency(GTSAM REQUIRED) @@ -21,4 +24,4 @@ if(BUILD_WITH_CUDA) find_dependency(CUDAToolkit REQUIRED) endif() -include("${CMAKE_CURRENT_LIST_DIR}/gtsam_points-targets.cmake") \ No newline at end of file +include("${CMAKE_CURRENT_LIST_DIR}/gtsam_points-targets.cmake")