forked from ros/console_bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make CMake configuration files relocatable (ros#45)
See discussion in ros#44
- Loading branch information
1 parent
9ef664d
commit 15eb3ea
Showing
2 changed files
with
20 additions
and
25 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 |
---|---|---|
|
@@ -3,24 +3,9 @@ if (@PKG_NAME@_CONFIG_INCLUDED) | |
endif() | ||
set(@PKG_NAME@_CONFIG_INCLUDED TRUE) | ||
|
||
set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@") | ||
@PACKAGE_INIT@ | ||
|
||
foreach(lib @PKG_LIBRARIES@) | ||
set(onelib "${lib}-NOTFOUND") | ||
find_library(onelib ${lib} | ||
PATHS "@CMAKE_INSTALL_FULL_LIBDIR@" | ||
NO_DEFAULT_PATH | ||
) | ||
if(NOT onelib) | ||
message(FATAL_ERROR "Library '${lib}' in package @PKG_NAME@ is not installed properly") | ||
endif() | ||
list(APPEND @PKG_NAME@_LIBRARIES ${onelib}) | ||
endforeach() | ||
set(@PKG_NAME@_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@") | ||
|
||
foreach(dep @PKG_DEPENDS@) | ||
if(NOT ${dep}_FOUND) | ||
find_package(${dep}) | ||
endif() | ||
list(APPEND @PKG_NAME@_INCLUDE_DIRS ${${dep}_INCLUDE_DIRS}) | ||
list(APPEND @PKG_NAME@_LIBRARIES ${${dep}_LIBRARIES}) | ||
endforeach() | ||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
set(@PKG_NAME@_LIBRARIES @PKG_NAME@) |