From: <ai...@us...> - 2012-11-02 19:13:52
|
Revision: 12270 http://plplot.svn.sourceforge.net/plplot/?rev=12270&view=rev Author: airwin Date: 2012-11-02 19:13:45 +0000 (Fri, 02 Nov 2012) Log Message: ----------- Use correct RPATH configuration for shapelib. This allows the Unix run-time loader to find versions of shapelib that are installed in a non-standard location. Modified Paths: -------------- trunk/cmake/modules/shapelib.cmake trunk/src/CMakeLists.txt Modified: trunk/cmake/modules/shapelib.cmake =================================================================== --- trunk/cmake/modules/shapelib.cmake 2012-11-02 19:10:52 UTC (rev 12269) +++ trunk/cmake/modules/shapelib.cmake 2012-11-02 19:13:45 UTC (rev 12270) @@ -1,6 +1,7 @@ # cmake/modules/shapefil.cmake # # Copyright (C) 2012 Andrew Ross +# Copyright (C) 2012 Alan W. Irwin # # This file is part of PLplot. # @@ -28,7 +29,10 @@ # Look for shapelib libraries if (HAVE_SHAPELIB) find_package(Shapelib) - if(NOT SHAPELIB_FOUND) + if(SHAPELIB_FOUND) + set(SHAPELIB_RPATH ${SHAPELIB_LIBRARY_DIRS}) + filter_rpath(SHAPELIB_RPATH) + else(SHAPELIB_FOUND) message(STATUS "WARNING: SHAPELIB not found. Setting HAVE_SHAPELIB to OFF." ) @@ -36,5 +40,5 @@ CACHE BOOL "Enable driver options for using SHAPELIB library for reading shapefile map data" FORCE ) - endif(NOT SHAPELIB_FOUND) + endif(SHAPELIB_FOUND) endif (HAVE_SHAPELIB) Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2012-11-02 19:10:52 UTC (rev 12269) +++ trunk/src/CMakeLists.txt 2012-11-02 19:13:45 UTC (rev 12270) @@ -318,6 +318,8 @@ ${SHAPELIB_LIBRARIES} ) + set(LIB_INSTALL_RPATH ${LIB_INSTALL_RPATH} ${SHAPELIB_RPATH}) + # Convert to -L... -l... form. string(REGEX REPLACE "(/[^ ]*)/lib([^ ]*)\\.so" "-L\\1 -l\\2" _SHAPELIB_LINK_FLAGS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |