From d8034f73c5a0f136d1d6c120435c2b47258903f4 Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Thu, 25 Apr 2013 18:40:21 +0000 Subject: [PATCH] Added install commands for generated header files --- CMakeLists.txt | 3 ++- gtsam/CMakeLists.txt | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd7e1afbc..0e834ab58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,7 +150,8 @@ endif() # Write Eigen include file with the paths for either the system Eigen or the GTSAM-bundled Eigen configure_file(gtsam/3rdparty/gtsam_eigen_includes.h.in gtsam/3rdparty/gtsam_eigen_includes.h) - +# Install the configuration file for Eigen +install(FILES ${CMAKE_BINARY_DIR}/gtsam/3rdparty/gtsam_eigen_includes.h DESTINATION include/gtsam/3rdparty) ############################################################################### diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index 9dff36853..c3c954716 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -44,6 +44,10 @@ else() set(excluded_sources ${excluded_sources} "${CMAKE_CURRENT_SOURCE_DIR}/geometry/Rot3Q.cpp") endif() +# Common headers +file(GLOB gtsam_core_headers "*.h") +install(FILES ${gtsam_core_headers} DESTINATION include/gtsam) + # assemble core libaries foreach(subdir ${gtsam_subdirs}) # Build convenience libraries @@ -77,6 +81,7 @@ set(gtsam_srcs ${nonlinear_srcs} ${slam_srcs} ${navigation_srcs} + ${gtsam_core_headers} ) # Versions @@ -129,8 +134,9 @@ set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/slam/dataset.cpp" "SOURCE_TREE_DATASET_DIR=\"${CMAKE_SOURCE_DIR}/examples/Data\"" "INSTALLED_DATASET_DIR=\"${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam_examples/Data\"") -# Generate config file +# Generate and install config file configure_file(config.h.in config.h) +install(FILES ${CMAKE_BINARY_DIR}/gtsam/config.h DESTINATION include/gtsam) # Create the matlab toolbox for the gtsam library if (GTSAM_INSTALL_MATLAB_TOOLBOX)