|
From: <gb...@us...> - 2008-02-26 03:43:33
|
Revision: 89
http://gearbox.svn.sourceforge.net/gearbox/?rev=89&view=rev
Author: gbiggs
Date: 2008-02-25 19:43:37 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
Added RPATH to the properties of libraries and executables - without this, they can't find other gearbox libs they depend on when executed.
Modified Paths:
--------------
gearbox/trunk/cmake/internal/TargetUtils.cmake
Modified: gearbox/trunk/cmake/internal/TargetUtils.cmake
===================================================================
--- gearbox/trunk/cmake/internal/TargetUtils.cmake 2008-02-26 01:49:30 UTC (rev 88)
+++ gearbox/trunk/cmake/internal/TargetUtils.cmake 2008-02-26 03:43:37 UTC (rev 89)
@@ -4,13 +4,16 @@
# Usage: GBX_ADD_EXECUTABLE( name src1 src2 src3 )
#
MACRO( GBX_ADD_EXECUTABLE name )
- ADD_EXECUTABLE( ${name} ${ARGN} )
- INSTALL( TARGETS ${name} RUNTIME DESTINATION bin )
- SET( templist ${COMPONENT_LIST} )
- LIST ( APPEND templist ${name} )
+ ADD_EXECUTABLE( ${name} ${ARGN} )
+ SET_TARGET_PROPERTIES( ${name} PROPERTIES
+ INSTALL_RPATH "${INSTALL_RPATH};@CMAKE_INSTALL_PREFIX@/lib/gearbox"
+ BUILD_WITH_INSTALL_RPATH TRUE )
+ INSTALL( TARGETS ${name} RUNTIME DESTINATION bin )
+ SET( templist ${COMPONENT_LIST} )
+ LIST ( APPEND templist ${name} )
# MESSAGE ( STATUS "DEBUG: ${templist}" )
- SET( COMPONENT_LIST ${templist} CACHE INTERNAL "Global list of components to build" FORCE )
- MESSAGE( STATUS "Planning to Build Executable: ${name}" )
+ SET( COMPONENT_LIST ${templist} CACHE INTERNAL "Global list of components to build" FORCE )
+ MESSAGE( STATUS "Planning to Build Executable: ${name}" )
ENDMACRO( GBX_ADD_EXECUTABLE name )
#
@@ -20,6 +23,9 @@
#
MACRO( GBX_ADD_LIBRARY name )
ADD_LIBRARY( ${name} ${ARGN} )
+ SET_TARGET_PROPERTIES( ${name} PROPERTIES
+ INSTALL_RPATH "${INSTALL_RPATH};@CMAKE_INSTALL_PREFIX@/lib/gearbox"
+ BUILD_WITH_INSTALL_RPATH TRUE )
INSTALL( TARGETS ${name} LIBRARY DESTINATION lib/gearbox )
SET( templist ${LIBRARY_LIST} )
LIST ( APPEND templist ${name} )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|