From: <ai...@us...> - 2010-02-08 19:33:44
|
Revision: 10796 http://plplot.svn.sourceforge.net/plplot/?rev=10796&view=rev Author: airwin Date: 2010-02-08 19:33:38 +0000 (Mon, 08 Feb 2010) Log Message: ----------- Define and use filter_rpath function to filter out default locations from rpath data. Modified Paths: -------------- trunk/cmake/modules/cairo.cmake trunk/cmake/modules/drivers.cmake trunk/cmake/modules/pdf.cmake trunk/cmake/modules/plplot.cmake trunk/cmake/modules/psttf.cmake trunk/cmake/modules/qt.cmake Modified: trunk/cmake/modules/cairo.cmake =================================================================== --- trunk/cmake/modules/cairo.cmake 2010-02-07 01:47:34 UTC (rev 10795) +++ trunk/cmake/modules/cairo.cmake 2010-02-08 19:33:38 UTC (rev 10796) @@ -111,6 +111,7 @@ message("Pango Cairo version (${version}) < 1.20.5, if text rendering is slow recommend turning off text clipping") endif(NUMERICAL_PANGOCAIRO_VERSION LESS "${NUMERICAL_PANGOCAIRO_MINIMUM_VERSION}") set(cairo_RPATH ${linkdir}) + filter_rpath(cairo_RPATH) if(PLD_xcairo AND X11_COMPILE_FLAGS) # Blank-delimited required. string(REGEX REPLACE ";" " " Modified: trunk/cmake/modules/drivers.cmake =================================================================== --- trunk/cmake/modules/drivers.cmake 2010-02-07 01:47:34 UTC (rev 10795) +++ trunk/cmake/modules/drivers.cmake 2010-02-08 19:33:38 UTC (rev 10796) @@ -53,6 +53,7 @@ find_package(LTDL) if(LTDL_FOUND) set(libplplot${LIB_TAG}_RPATH ${LTDL_LIBRARY_DIR}) + filter_rpath(libplplot${LIB_TAG}_RPATH) message(STATUS "LTDL_INCLUDE_DIR = ${LTDL_INCLUDE_DIR}") message(STATUS "LTDL_LIBRARY_DIR = ${LTDL_LIBRARY_DIR}") message(STATUS "LTDL_LIBRARIES = ${LTDL_LIBRARIES}") Modified: trunk/cmake/modules/pdf.cmake =================================================================== --- trunk/cmake/modules/pdf.cmake 2010-02-07 01:47:34 UTC (rev 10795) +++ trunk/cmake/modules/pdf.cmake 2010-02-08 19:33:38 UTC (rev 10796) @@ -39,6 +39,7 @@ endif(WIN32) set(pdf_LINK_FLAGS "${hpdf_LIBRARIES}") set(pdf_RPATH ${hpdf_LIBRARY_DIRS}) + filter_rpath(pdf_RPATH) set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${pdf_LINK_FLAGS}) else(hpdf_FOUND) message(STATUS "Looking for haru pdf header and library - not found") Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2010-02-07 01:47:34 UTC (rev 10795) +++ trunk/cmake/modules/plplot.cmake 2010-02-08 19:33:38 UTC (rev 10796) @@ -82,6 +82,27 @@ set(${numerical_result} ${internal_numerical_result} PARENT_SCOPE) endfunction(TRANSFORM_VERSION) +# CMake-2.6.x duplicates this list so work around that bug by removing +# those duplicates. +if(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) + list(REMOVE_DUPLICATES CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) +endif(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) + +# Filter all CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES list elements from +# rpath_in list. +function(filter_rpath rpath) + message("DEBUG: ${rpath} = ${${rpath}}") + set(internal_rpath ${${rpath}}) + if(internal_rpath) + list(REMOVE_DUPLICATES internal_rpath) + if(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) + list(REMOVE_ITEM internal_rpath ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}) + endif(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) + endif(internal_rpath) + message("DEBUG: (filtered) ${rpath} = ${internal_rpath}") + set(${rpath} ${internal_rpath} PARENT_SCOPE) +endfunction(filter_rpath) + # ======================================================================= # Compilation and build options (PLFLT, install locations, and rpath) # Note, must come before java since that depends on, e.g., LIB_DIR. Modified: trunk/cmake/modules/psttf.cmake =================================================================== --- trunk/cmake/modules/psttf.cmake 2010-02-07 01:47:34 UTC (rev 10795) +++ trunk/cmake/modules/psttf.cmake 2010-02-08 19:33:38 UTC (rev 10796) @@ -62,6 +62,7 @@ string(REGEX REPLACE ";" " " psttf_COMPILE_FLAGS "${cflags}") set(psttf_LINK_FLAGS ${linkflags}) set(psttf_RPATH ${libdir}) + filter_rpath(psttf_RPATH) list(APPEND DRIVERS_LINK_FLAGS ${psttf_LINK_FLAGS}) else(linkflags) message("includedir = ${includedir}") Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2010-02-07 01:47:34 UTC (rev 10795) +++ trunk/cmake/modules/qt.cmake 2010-02-08 19:33:38 UTC (rev 10796) @@ -80,6 +80,7 @@ set(qt_LINK_FLAGS) set(qt_RPATH ${QT_LIBRARY_DIR}) + filter_rpath(qt_RPATH) #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}") else(QT4_FOUND) message(STATUS "WARNING: Qt4 development environment not found so " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |