From 321cc78bbb05ce2e7441773431f45528a2bd94b3 Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Mon, 5 May 2014 14:02:18 +0200 Subject: [PATCH 1/4] dynamicEDT3D: install CMake module under share/dynamicEDT3D/ dynamicEDT3D was the only subproject installing its CMake module files under lib/cmake/. This patch cleans this up, making dynamicEDT3D installation consistent with the octomap and octovis ones. --- dynamicEDT3D/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamicEDT3D/CMakeLists.txt b/dynamicEDT3D/CMakeLists.txt index ac24b80d..4e7d96a9 100644 --- a/dynamicEDT3D/CMakeLists.txt +++ b/dynamicEDT3D/CMakeLists.txt @@ -94,7 +94,7 @@ configure_file(dynamicEDT3DConfig-version.cmake.in install(FILES "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake" "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" - DESTINATION lib/cmake/dynamicEDT3D/) + DESTINATION share/dynamicEDT3D/) # Write pkgconfig-file: include(InstallPkgConfigFile) From 3af3ddc47589edfe2e51f89e7291374401ebcf12 Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Mon, 5 May 2014 14:19:04 +0200 Subject: [PATCH 2/4] dynamicEDT3D: rename CMake module file names dynamicEDT3D was the only subproject naming its CMake module files Config.cmake. This patch cleans this up, using the -config.cmake pattern; so make dynamicEDT3D consistent with what is done for octomap and octovis. --- dynamicEDT3D/CMakeLists.txt | 22 +++++++++---------- ...n => dynamicEDT3D-config-version.cmake.in} | 0 ....cmake.in => dynamicEDT3D-config.cmake.in} | 0 3 files changed, 11 insertions(+), 11 deletions(-) rename dynamicEDT3D/{dynamicEDT3DConfig-version.cmake.in => dynamicEDT3D-config-version.cmake.in} (100%) rename dynamicEDT3D/{dynamicEDT3DConfig.cmake.in => dynamicEDT3D-config.cmake.in} (100%) diff --git a/dynamicEDT3D/CMakeLists.txt b/dynamicEDT3D/CMakeLists.txt index 4e7d96a9..f9e77cf8 100644 --- a/dynamicEDT3D/CMakeLists.txt +++ b/dynamicEDT3D/CMakeLists.txt @@ -67,33 +67,33 @@ install(FILES ${dynamicEDT3D_HDRS} DESTINATION include/dynamicEDT3D) # (this registers the build-tree with a global CMake-registry) export(PACKAGE dynamicEDT3D) -# Create a dynamicEDT3DConfig.cmake file for the use from the build tree +# Create a dynamicEDT3D-config.cmake file for the use from the build tree set(DYNAMICEDT3D_INCLUDE_DIRS "${INCLUDE_DIRS}") set(DYNAMICEDT3D_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") # not used right now (export depends?) #set(DYNEDT3D_CMAKE_DIR "${PROJECT_BINARY_DIR}") -configure_file(dynamicEDT3DConfig.cmake.in - "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3DConfig.cmake" @ONLY) -configure_file(dynamicEDT3DConfig-version.cmake.in - "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3DConfig-version.cmake" @ONLY) +configure_file(dynamicEDT3D-config.cmake.in + "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3D-config.cmake" @ONLY) +configure_file(dynamicEDT3D-config-version.cmake.in + "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/dynamicEDT3D/dynamicEDT3D-config-version.cmake" @ONLY) # Install the export set for use with the install-tree #install(EXPORT FooBarLibraryDepends DESTINATION # "${INSTALL_DATA_DIR}/FooBar/CMake" # COMPONENT dev) -# Create a dynamicEDT3DConfig.cmake file for the use from the install tree +# Create a dynamicEDT3D-config.cmake file for the use from the install tree # and install it set(DYNAMICEDT3D_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include") set(DYNAMICEDT3D_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") #set(DYNAMICEDT3D_CMAKE_DIR "${INSTALL_DATA_DIR}/FooBar/CMake") -configure_file(dynamicEDT3DConfig.cmake.in - "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake" @ONLY) -configure_file(dynamicEDT3DConfig-version.cmake.in - "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" @ONLY) +configure_file(dynamicEDT3D-config.cmake.in + "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3D-config.cmake" @ONLY) +configure_file(dynamicEDT3D-config-version.cmake.in + "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3D-config-version.cmake" @ONLY) install(FILES "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake" - "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" + "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" DESTINATION share/dynamicEDT3D/) # Write pkgconfig-file: diff --git a/dynamicEDT3D/dynamicEDT3DConfig-version.cmake.in b/dynamicEDT3D/dynamicEDT3D-config-version.cmake.in similarity index 100% rename from dynamicEDT3D/dynamicEDT3DConfig-version.cmake.in rename to dynamicEDT3D/dynamicEDT3D-config-version.cmake.in diff --git a/dynamicEDT3D/dynamicEDT3DConfig.cmake.in b/dynamicEDT3D/dynamicEDT3D-config.cmake.in similarity index 100% rename from dynamicEDT3D/dynamicEDT3DConfig.cmake.in rename to dynamicEDT3D/dynamicEDT3D-config.cmake.in From 9c0885a3fc6a786e4a0c95a676030b2a96363983 Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Tue, 18 Mar 2014 21:51:20 +0100 Subject: [PATCH 3/4] cmake: offer CMake modules with no hard-coded path Hardcoding absolute install paths in the CMake module files totally breaks the cross-compilation: it makes impossible to be used in a sysroot because the hardcoded paths are the ones of the target, whereas they should point to the sysroot location. This tootally breaks the CMake FIND_ROOT_PATH mechanism designed to handle cross-compilation. This patch introduces a new CMake variable: NO_ABSOLUTE_PATH_IN_MODULE, which, when set on the cmake command-line, will enable the installation of the CMake module files using the CMake primitives find_library and find_path to set the libraries and headers' locations, instead of hard-coding them. Thus, this patch adds non-templated CMake module files for octomap, dynamicEDT3D and octovis for the non hard-coded path version of the modules. In any way, only the installed CMake module files are changed. The templated ones are still needed for combined package build. The non hard-coded path version of the modules are only installed when NO_ABSOLUTE_PATH_IN_MODULE is set; by default the existing behavior remains unchanged to keep honoring the behavior described in [1]. [1] https://github.com/OctoMap/octomap/pull/57#issuecomment-38161187 --- dynamicEDT3D/CMakeLists.txt | 9 ++++-- dynamicEDT3D/dynamicEDT3D-config.cmake | 19 ++++++++++++ octomap/CMakeLists.txt | 7 ++++- octomap/octomap-config.cmake | 41 ++++++++++++++++++++++++++ octovis/CMakeLists.txt | 7 ++++- octovis/octovis-config.cmake | 24 +++++++++++++++ 6 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 dynamicEDT3D/dynamicEDT3D-config.cmake create mode 100644 octomap/octomap-config.cmake create mode 100644 octovis/octovis-config.cmake diff --git a/dynamicEDT3D/CMakeLists.txt b/dynamicEDT3D/CMakeLists.txt index f9e77cf8..2f5ca21d 100644 --- a/dynamicEDT3D/CMakeLists.txt +++ b/dynamicEDT3D/CMakeLists.txt @@ -91,9 +91,14 @@ configure_file(dynamicEDT3D-config.cmake.in "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3D-config.cmake" @ONLY) configure_file(dynamicEDT3D-config-version.cmake.in "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3D-config-version.cmake" @ONLY) +IF(DEFINED NO_ABSOLUTE_PATH_IN_MODULE AND NO_ABSOLUTE_PATH_IN_MODULE) + set(DYNAMICEDT3D_MODULE_FILE "dynamicEDT3D-config.cmake") +ELSE() + set(DYNAMICEDT3D_MODULE_FILE "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3D-config.cmake" ) +ENDIF() install(FILES - "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig.cmake" - "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3DConfig-version.cmake" + "${PROJECT_BINARY_DIR}/InstallFiles/dynamicEDT3D-config-version.cmake" + "${DYNAMICEDT3D_MODULE_FILE}" DESTINATION share/dynamicEDT3D/) # Write pkgconfig-file: diff --git a/dynamicEDT3D/dynamicEDT3D-config.cmake b/dynamicEDT3D/dynamicEDT3D-config.cmake new file mode 100644 index 00000000..c21a9aea --- /dev/null +++ b/dynamicEDT3D/dynamicEDT3D-config.cmake @@ -0,0 +1,19 @@ +# - Config file for the OctoMap package +# (example from http://www.vtk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file) +# It defines the following variables +# OCTOMAP_INCLUDE_DIRS - include directories for OctoMap +# OCTOMAP_LIBRARIES - libraries to link against + +set(DYNAMICEDT3D_INCLUDE_DIRS) +set(DYNAMICEDT3D_INCLUDE DYNAMICEDT3D_INCLUDE-NOTFOUND) +find_path(DYNAMICEDT3D_INCLUDE dynamicEDT3D/dynamicEDT3D.h) +if(DYNAMICEDT3D_INCLUDE) + list(APPEND DYNAMICEDT3D_INCLUDE_DIRS ${DYNAMICEDT3D_INCLUDE}) +endif() + +set(DYNAMICEDT3D_LIBRARIES) +set(DYNAMICEDT3D_LIB DYNAMICEDT3D_LIB-NOTFOUND) +find_library(DYNAMICEDT3D_LIB dynamicedt3d) +if(DYNAMICEDT3D_LIB) + list(APPEND DYNAMICEDT3D_LIBRARIES ${DYNAMICEDT3D_LIB}) +endif() diff --git a/octomap/CMakeLists.txt b/octomap/CMakeLists.txt index 9c9f674b..71099a37 100644 --- a/octomap/CMakeLists.txt +++ b/octomap/CMakeLists.txt @@ -98,9 +98,14 @@ configure_file(octomap-config.cmake.in "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake" @ONLY) configure_file(octomap-config-version.cmake.in "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake" @ONLY) +IF(DEFINED NO_ABSOLUTE_PATH_IN_MODULE AND NO_ABSOLUTE_PATH_IN_MODULE) + set(OCTOMAP_MODULE_FILE "octomap-config.cmake") +ELSE() + set(OCTOMAP_MODULE_FILE "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake" ) +ENDIF() install(FILES - "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake" "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake" + "${OCTOMAP_MODULE_FILE}" DESTINATION share/octomap/) # Write pkgconfig-file: diff --git a/octomap/octomap-config.cmake b/octomap/octomap-config.cmake new file mode 100644 index 00000000..5572b898 --- /dev/null +++ b/octomap/octomap-config.cmake @@ -0,0 +1,41 @@ +# =================================================================================== +# The OctoMap CMake configuration file +# +# ** File generated automatically, do not modify ** +# +# Usage from an external project: +# In your CMakeLists.txt, add these lines: +# +# FIND_PACKAGE(octomap REQUIRED ) +# TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${OCTOMAP_LIBRARIES}) +# +# This file will define the following variables: +# - OCTOMAP_LIBRARIES : The list of libraries to links against. +# - OCTOMAP_LIBRARY_DIRS : The directory where lib files are. Calling +# LINK_DIRECTORIES with this path is NOT needed. +# - OCTOMAP_INCLUDE_DIRS : The OpenCV include directories. +# +# Based on the example CMake Tutorial +# http://www.vtk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file +# and OpenCVConfig.cmake.in from OpenCV +# =================================================================================== + +set(OCTOMAP_INCLUDE_DIRS) +set(OCTOMAP_INCLUDE OCTOMAP_INCLUDE-NOTFOUND) +find_path(OCTOMAP_INCLUDE octomap/octomap.h) +if(OCTOMAP_INCLUDE) + list(APPEND OCTOMAP_INCLUDE_DIRS ${OCTOMAP_INCLUDE}) +endif() + +set(OCTOMAP_LIBRARIES) +set(OCTOMAP_LIB OCTOMAP_LIB-NOTFOUND) +find_library(OCTOMAP_LIB octomap) +if(OCTOMAP_LIB) + list(APPEND OCTOMAP_LIBRARIES ${OCTOMAP_LIB}) +endif() + +set(OCTOMATH_LIB OCTOMATH_LIB-NOTFOUND) +find_library(OCTOMATH_LIB octomath) +if(OCTOMATH_LIB) + list(APPEND OCTOMAP_LIBRARIES ${OCTOMATH_LIB}) +endif() diff --git a/octovis/CMakeLists.txt b/octovis/CMakeLists.txt index edfca27e..c62b6bc3 100644 --- a/octovis/CMakeLists.txt +++ b/octovis/CMakeLists.txt @@ -95,9 +95,14 @@ IF(BUILD_VIEWER) "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config.cmake" @ONLY) configure_file(octovis-config-version.cmake.in "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake" @ONLY) + IF(DEFINED NO_ABSOLUTE_PATH_IN_MODULE AND NO_ABSOLUTE_PATH_IN_MODULE) + set(OCTOVIS_MODULE_FILE "octovis-config.cmake") + ELSE() + set(OCTOVIS_MODULE_FILE "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config.cmake" ) + ENDIF() install(FILES - "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config.cmake" "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake" + "${OCTOVIS_MODULE_FILE}" DESTINATION share/octovis/) diff --git a/octovis/octovis-config.cmake b/octovis/octovis-config.cmake new file mode 100644 index 00000000..99d9798f --- /dev/null +++ b/octovis/octovis-config.cmake @@ -0,0 +1,24 @@ +# - Config file for the OctoMap package +# (example from http://www.vtk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file) +# It defines the following variables +# OCTOVIS_INCLUDE_DIRS - include directories for OctoMap viewer +# OCTOVIS_LIBRARIES - libraries to link against + +find_package(OCTOMAP) + +set(QGLViewer_LIB QGLViewer_LIB-NOTFOUND) +find_library(QGLViewer_LIB QGLViewer) +if(NOT QGLViewer_LIB) + message(FATAL "Could not find QGLViewer") +endif() + +find_package(Qt4 COMPONENTS QTCORE QTGUI QTOPENGL) + +set(OCTOVIS_INCLUDE_DIRS) +set(OCTOVIS_LIBRARIES) + +list(APPEND OCTOVIS_INCLUDE_DIRS ${OCTOMAP_INCLUDE} + ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR}) + +list(APPEND OCTOVIS_LIBRARIES ${OCTOMAP_LIB} ${QGLViewer_LIB} + ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY}) From 3c55cb2ca9796c26284f54c9fa085284ba37e2db Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Mon, 5 May 2014 14:19:15 +0200 Subject: [PATCH 4/4] cmake: cleanup trailing whitespaces --- CMakeLists.txt | 3 --- dynamicEDT3D/CMakeLists.txt | 6 +++--- octomap/CMakeLists.txt | 8 ++++---- octovis/CMakeLists.txt | 24 ++++++++++++------------ 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c01d4022..651fdc44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,3 @@ ENABLE_TESTING() # enable CTest environment of subprojects ADD_SUBDIRECTORY( octomap ) ADD_SUBDIRECTORY( octovis ) ADD_SUBDIRECTORY( dynamicEDT3D ) - - - diff --git a/dynamicEDT3D/CMakeLists.txt b/dynamicEDT3D/CMakeLists.txt index 2f5ca21d..42f00bd0 100644 --- a/dynamicEDT3D/CMakeLists.txt +++ b/dynamicEDT3D/CMakeLists.txt @@ -66,7 +66,7 @@ install(FILES ${dynamicEDT3D_HDRS} DESTINATION include/dynamicEDT3D) # Export the package for use from the build-tree # (this registers the build-tree with a global CMake-registry) export(PACKAGE dynamicEDT3D) - + # Create a dynamicEDT3D-config.cmake file for the use from the build tree set(DYNAMICEDT3D_INCLUDE_DIRS "${INCLUDE_DIRS}") set(DYNAMICEDT3D_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") @@ -81,7 +81,7 @@ configure_file(dynamicEDT3D-config-version.cmake.in #install(EXPORT FooBarLibraryDepends DESTINATION # "${INSTALL_DATA_DIR}/FooBar/CMake" # COMPONENT dev) - + # Create a dynamicEDT3D-config.cmake file for the use from the install tree # and install it set(DYNAMICEDT3D_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include") @@ -110,7 +110,7 @@ install_pkg_config_file(dynamicEDT3D VERSION ${DYNAMICEDT3D_MAJOR_VERSION}.${DYNAMICEDT3D_MINOR_VERSION}.${DYNAMICEDT3D_PATCH_VERSION}) -# Documentation +# Documentation FIND_PACKAGE(Doxygen) IF(DOXYGEN_FOUND) ADD_CUSTOM_TARGET(docs_dynamicEDT3D ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dynamicEDT3D.dox diff --git a/octomap/CMakeLists.txt b/octomap/CMakeLists.txt index 71099a37..e73c302c 100644 --- a/octomap/CMakeLists.txt +++ b/octomap/CMakeLists.txt @@ -73,7 +73,7 @@ add_custom_target(uninstall # Export the package for use from the build-tree # (this registers the build-tree with a global CMake-registry) export(PACKAGE octomap) - + # Create a octomap-config.cmake file for the use from the build tree set(OCTOMAP_INCLUDE_DIRS "${INCLUDE_DIRS}") set(OCTOMAP_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") @@ -88,7 +88,7 @@ configure_file(octomap-config-version.cmake.in #install(EXPORT FooBarLibraryDepends DESTINATION # "${INSTALL_DATA_DIR}/FooBar/CMake" # COMPONENT dev) - + # Create a octomap-config.cmake file for the use from the install tree # and install it set(OCTOMAP_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include") @@ -104,7 +104,7 @@ ELSE() set(OCTOMAP_MODULE_FILE "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config.cmake" ) ENDIF() install(FILES - "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake" + "${PROJECT_BINARY_DIR}/InstallFiles/octomap-config-version.cmake" "${OCTOMAP_MODULE_FILE}" DESTINATION share/octomap/) @@ -116,7 +116,7 @@ install_pkg_config_file(octomap REQUIRES VERSION ${OCTOMAP_VERSION}) -# Documentation +# Documentation FIND_PACKAGE(Doxygen) IF(DOXYGEN_FOUND) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/octomap.dox.in ${CMAKE_CURRENT_BINARY_DIR}/octomap.dox @ONLY) diff --git a/octovis/CMakeLists.txt b/octovis/CMakeLists.txt index c62b6bc3..7d0195f5 100644 --- a/octovis/CMakeLists.txt +++ b/octovis/CMakeLists.txt @@ -47,15 +47,15 @@ set(INSTALL_TARGETS_DEFAULT_ARGS ARCHIVE DESTINATION lib ) -# Builds the "octovis" viewer based on OpenGL and +# Builds the "octovis" viewer based on OpenGL and # libQGLViewer, if dependencies available SET( BUILD_VIEWER 0) # Look for required libraries: FIND_PACKAGE(OpenGL) FIND_PACKAGE(Qt4) -IF (OpenGL-NOTFOUND OR Qt4-NOTFOUND) - MESSAGE ( "OpenGL and QT4 are required for octovis but could not be found.") +IF (OpenGL-NOTFOUND OR Qt4-NOTFOUND) + MESSAGE ( "OpenGL and QT4 are required for octovis but could not be found.") ELSE() FIND_PACKAGE(QGLViewer) IF(QGLViewer_FOUND) @@ -70,12 +70,12 @@ ENDIF() IF(BUILD_VIEWER) MESSAGE(STATUS "\n") MESSAGE(STATUS "viewer octovis will be built") - + set(INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include") INCLUDE_DIRECTORIES(${INCLUDE_DIRS}) - + INCLUDE( CMakeLists_src.txt ) - + # Create an octovis-config.cmake file for the use from the build tree set(OCTOVIS_INCLUDE_DIR "${INCLUDE_DIRS}") set(OCTOVIS_LIB_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") @@ -84,8 +84,8 @@ IF(BUILD_VIEWER) configure_file(octovis-config.cmake.in "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octovis/octovis-config.cmake" @ONLY) configure_file(octovis-config-version.cmake.in - "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octovis/octovis-config-version.cmake" @ONLY) - + "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octovis/octovis-config-version.cmake" @ONLY) + # Create a octovis-config.cmake file for the use from the install tree # and install it set(OCTOVIS_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include") @@ -101,11 +101,11 @@ IF(BUILD_VIEWER) set(OCTOVIS_MODULE_FILE "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config.cmake" ) ENDIF() install(FILES - "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake" + "${PROJECT_BINARY_DIR}/InstallFiles/octovis-config-version.cmake" "${OCTOVIS_MODULE_FILE}" DESTINATION share/octovis/) - - + + # #installation: # # store all header files to install: file(GLOB octovis_HDRS *.h *.hxx *.hpp) @@ -113,7 +113,7 @@ IF(BUILD_VIEWER) # Install catkin package.xml install(FILES package.xml DESTINATION share/octovis) - + ELSE() MESSAGE ( "Unfortunately, the viewer (octovis) can not be built because some requirements are missing.") MESSAGE ( "This will not affect the compilation of the stand-alone library and tools (octomap)")