diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-12-02 15:41:53 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-12-02 15:41:53 +0100 |
| commit | 9488b26ca5b7ea763db4e210b311bcf3f04233ca (patch) | |
| tree | efc6899ca64f3e9eae26c90e3d2790ff4862aa98 /CMakeLists.txt | |
| parent | ebe00831b7d6de3aae01ddd5f3074e53ac6d981e (diff) | |
| download | PROJ-9488b26ca5b7ea763db4e210b311bcf3f04233ca.tar.gz PROJ-9488b26ca5b7ea763db4e210b311bcf3f04233ca.zip | |
Add build time option to make PROJ_LIB env var tested last (fixes #2399)
If PROJ is built with the PROJ_LIB_ENV_VAR_TRIED_LAST CMake option /
--enable-proj-lib-env-var-tried-last configure switch, then the
hard-wired path ($prefix/share/proj) will be tried before looking at the
environment PROJ_LIB.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ee1444a4..344823ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,6 +177,13 @@ if(ENABLE_CURL) endif() ################################################################################ + +option(PROJ_LIB_ENV_VAR_TRIED_LAST "Whether the PROJ_LIB environment variable should be tried after the hardcoded location" OFF) +if(PROJ_LIB_ENV_VAR_TRIED_LAST) + add_definitions(-DPROJ_LIB_ENV_VAR_TRIED_LAST) +endif() + +################################################################################ # threading configuration ################################################################################ set(CMAKE_THREAD_PREFER_PTHREAD TRUE) |
