Skip to content

Commit

Permalink
Merge pull request #4 from koide3/install
Browse files Browse the repository at this point in the history
install FindGTSAM.cmake
  • Loading branch information
koide3 authored Jul 16, 2024
2 parents d0316a2 + 8fb3a36 commit e1ed7a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}
)
5 changes: 4 additions & 1 deletion cmake/gtsam_points-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -21,4 +24,4 @@ if(BUILD_WITH_CUDA)
find_dependency(CUDAToolkit REQUIRED)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/gtsam_points-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/gtsam_points-targets.cmake")

0 comments on commit e1ed7a6

Please sign in to comment.