aboutsummaryrefslogtreecommitdiff
path: root/src/lib_proj.cmake
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-02-09 00:53:35 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-02-11 15:48:05 +0100
commit29583196dfae2565a35c7a8759cc8a5640d6a2b1 (patch)
treec862cb9d4206f3be8bc11b9f28855abe43cff018 /src/lib_proj.cmake
parenta10b5edfad805b1e09d88b31b953707412440b09 (diff)
downloadPROJ-29583196dfae2565a35c7a8759cc8a5640d6a2b1.tar.gz
PROJ-29583196dfae2565a35c7a8759cc8a5640d6a2b1.zip
Use relative directory to locate PROJ resource files.
Fixes #1490 This is an extension of the Window-specific logic added recently to Unix builds. This reuses parts of proposed past commit https://github.com/OSGeo/PROJ/pull/1517/commits/82a07e51c6e24ddb936d131ababe29f1ac36ef14 (credits to @abellgithub)
Diffstat (limited to 'src/lib_proj.cmake')
-rw-r--r--src/lib_proj.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index 3c42f973..d14a48c6 100644
--- a/src/lib_proj.cmake
+++ b/src/lib_proj.cmake
@@ -415,6 +415,10 @@ if(UNIX)
if(M_LIB)
target_link_libraries(${PROJ_CORE_TARGET} -lm)
endif()
+ find_library(DL_LIB dl)
+ if(M_LIB)
+ target_link_libraries(${PROJ_CORE_TARGET} -ldl)
+ endif()
endif()
if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT})