aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorHoward Butler <howard@hobu.co>2015-02-21 16:27:45 +0000
committerHoward Butler <howard@hobu.co>2015-02-21 16:27:45 +0000
commitfab753b40728709da376680efbc503ba2643faad (patch)
treeeab7b4e39682a3b78d66624b795531403be0f8e8 /src/CMakeLists.txt
parent0126497485bc28ef8d83fdbbf5bf76d71d16c158 (diff)
downloadPROJ-fab753b40728709da376680efbc503ba2643faad.tar.gz
PROJ-fab753b40728709da376680efbc503ba2643faad.zip
clean up include installation for CMake #262
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2628 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e9a36aac..77d5d6f5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,6 +8,20 @@ option(BUILD_PROJ "Build proj (cartographic projection tool : latlong <-> projec
option(BUILD_GEOD "Build geod (computation of geodesic lines)" ON)
option(BUILD_NAD2BIN "Build nad2bin (format conversion tool) " ON)
+if(NOT MSVC)
+ if (NOT APPLE)
+ # Use relative path so that package is relocatable
+ set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
+ else ()
+ set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ # TO DO: cmake 2.8.12 introduces a way to make the install tree
+ # relocatable with OSX via
+ # (1) set(CMAKE_MACOSX_RPATH ON) and
+ # (2) setting the INSTALL_RPATH property on the executables to
+ # "@loader_path/../lib"
+ endif ()
+endif ()
+
if(BUILD_CS2CS)
include(bin_cs2cs.cmake)
endif(BUILD_CS2CS)