Skip to content

Commit b77b381

Browse files
author
homann
committed
Setting runpath for locating dynamic libraries in the installation directory
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6686 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6f14df8 commit b77b381

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/gui/CMakeLists.txt

+16
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ ELSE (WIN32)
4343
ADD_EXECUTABLE(qgis ${QGIS_APP_SRCS})
4444
ENDIF (WIN32)
4545

46+
# This sets runpath to the installation directory
47+
SET_TARGET_PROPERTIES(qgis PROPERTIES
48+
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib
49+
BUILD_WITH_INSTALL_RPATH true
50+
)
51+
52+
# Uncomment this to set runpath to the directory path specified at compile time
53+
#SET_TARGET_PROPERTIES(qgis PROPERTIES
54+
# INSTALL_RPATH_USE_LINK_PATH true
55+
#)
56+
57+
# Uncomment this to set runpath relative to executable
58+
#SET_TARGET_PROPERTIES(qgis PROPERTIES
59+
# LINK_FLAGS "-Wl,-rpath,'\$\$ORIGIN/../lib'"
60+
#)
61+
4662
TARGET_LINK_LIBRARIES(qgis
4763
${QT_LIBRARIES}
4864
qgis_core

0 commit comments

Comments
 (0)