Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 24, 2011, 5:48:53 AM (14 years ago)
Author:
rgrieder
Message:

RPATH handling was broken in certain cases, esp. for "turn-key" (INSTALL_COPYABLE) installations.
Fixed by using the "$ORIGIN" token and distinguishing between executable, library and module when setting the RPATH.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2/cmake/tools/TargetUtilities.cmake

    r8317 r8318  
    288288
    289289  # RPATH settings for the installation
    290   IF(UNIX)
    291     SET(_rpath ${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIRECTORY})
     290  IF(_target_type STREQUAL "LIBRARY")
    292291    IF(_arg_MODULE)
    293       LIST(APPEND _rpath ${CMAKE_INSTALL_PREFIX}/${MODULE_INSTALL_DIRECTORY})
    294     ENDIF()
    295     SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}")
    296   ENDIF()
     292      SET(_rpath "${MODULE_RPATH}")
     293    ELSE()
     294      SET(_rpath "${LIBRARY_RPATH}")
     295    ENDIF()
     296  ELSE()
     297    SET(_rpath "${RUNTIME_RPATH}")
     298  ENDIF()
     299  SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}")
    297300
    298301  # DEFINE_SYMBOL
Note: See TracChangeset for help on using the changeset viewer.