-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix assumptions that CMAKE_INSTALL_*DIR paths are relative. (#2779)
When an absolute path is desired, the CMAKE_INSTALL_FULL_*DIR variables should be used instead of concatenating with CMAKE_INSTALL_PREFIX. Special handling is also needed for pkg-config files.
- Loading branch information
1 parent
439247e
commit 3a848db
Showing
7 changed files
with
57 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This module provides a function for joining paths | ||
# known from most languages | ||
# | ||
# SPDX-License-Identifier: (MIT OR CC0-1.0) | ||
# Copyright 2020 Jan Tojnar | ||
# https://github.com/jtojnar/cmake-snips | ||
# | ||
# Modelled after Python’s os.path.join | ||
# https://docs.python.org/3.7/library/os.path.html#os.path.join | ||
# Windows not supported | ||
function(join_paths joined_path first_path_segment) | ||
set(temp_path "${first_path_segment}") | ||
foreach(current_segment IN LISTS ARGN) | ||
if(NOT ("${current_segment}" STREQUAL "")) | ||
if(IS_ABSOLUTE "${current_segment}") | ||
set(temp_path "${current_segment}") | ||
else() | ||
set(temp_path "${temp_path}/${current_segment}") | ||
endif() | ||
endif() | ||
endforeach() | ||
set(${joined_path} "${temp_path}" PARENT_SCOPE) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
libdir=@pkgconfig_libdir@ | ||
includedir=@pkgconfig_includedir@ | ||
|
||
Name: gazebo | ||
Description: Gazebo Libraries | ||
Version: @GAZEBO_VERSION_FULL@ | ||
Requires: sdformat protobuf @TBB_PKG_CONFIG@ ignition-math4 ignition-msgs1 ignition-transport4 @IGNITION_FUEL_TOOLS_PKGCONFIG@ | ||
Libs: -Wl,-rpath,${prefix}/@CMAKE_INSTALL_LIBDIR@/gazebo-@GAZEBO_MAJOR_VERSION@/plugins -L${libdir} -L${prefix}/@CMAKE_INSTALL_LIBDIR@/gazebo-@GAZEBO_MAJOR_VERSION@/plugins -lgazebo_transport -lgazebo_physics -lgazebo_sensors -lgazebo_rendering -lgazebo_gui -lgazebo_client -lgazebo_msgs -lgazebo_common -lgazebo @Boost_PKGCONFIG_LIBS@ @APPLE_PKGCONFIG_LIBS@ | ||
Libs: -Wl,-rpath,${libdir}/gazebo-@GAZEBO_MAJOR_VERSION@/plugins -L${libdir} -L${libdir}/gazebo-@GAZEBO_MAJOR_VERSION@/plugins -lgazebo_transport -lgazebo_physics -lgazebo_sensors -lgazebo_rendering -lgazebo_gui -lgazebo_client -lgazebo_msgs -lgazebo_common -lgazebo @Boost_PKGCONFIG_LIBS@ @APPLE_PKGCONFIG_LIBS@ | ||
CFlags: -I${includedir}/gazebo-@GAZEBO_MAJOR_VERSION@ @Boost_PKGCONFIG_CFLAGS@ -std=c++11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
libdir=@pkgconfig_libdir@ | ||
includedir=@pkgconfig_includedir@ | ||
|
||
Name: gazebo | ||
Description: Gazebo Exported ODE Libraries | ||
Version: @GAZEBO_VERSION_FULL@ | ||
Requires: | ||
Libs: -Wl,-rpath,${prefix}/@CMAKE_INSTALL_LIBDIR@ -L${prefix}/@CMAKE_INSTALL_LIBDIR@ -lgazebo_ode | ||
Libs: -Wl,-rpath,${libdir} -L${libdir} -lgazebo_ode | ||
CFlags: -I${includedir}/gazebo-@GAZEBO_MAJOR_VERSION@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters