Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: do not leak absolute path into cmake package config #391

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions octomap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ add_custom_target(uninstall
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}")
set(OCTOMAP_INCLUDE_DIRS "include")
set(OCTOMAP_LIB_DIR "lib")
# Set library names as absolute paths
# Windows, spec. MSVC requires the .lib suffix for imported libs
IF(WIN32)
Expand Down Expand Up @@ -127,8 +127,8 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(

# Create a octomap-config.cmake file for the use from the install tree
# and install it
set(OCTOMAP_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
set(OCTOMAP_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
set(OCTOMAP_INCLUDE_DIRS "include")
set(OCTOMAP_LIB_DIR "lib")
#set(OCTOMAP_CMAKE_DIR "${INSTALL_DATA_DIR}/FooBar/CMake")

set(OCTOMAP_INCLUDE_TARGETS
Expand Down
4 changes: 2 additions & 2 deletions octomap/octomap-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ set_and_check(OCTOMAP_LIBRARY_DIRS "@PACKAGE_OCTOMAP_LIB_DIR@")

# Set library names
set(OCTOMAP_LIBRARIES
"@PACKAGE_OCTOMAP_LIB_DIR@/@OCTOMAP_LIBRARY@"
"@PACKAGE_OCTOMAP_LIB_DIR@/@OCTOMATH_LIBRARY@"
"octomap"
"octomath"
)

# Additionally set the variables using a lower-case project name.
Expand Down