diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-02-09 00:53:35 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-02-11 15:48:05 +0100 |
| commit | 29583196dfae2565a35c7a8759cc8a5640d6a2b1 (patch) | |
| tree | c862cb9d4206f3be8bc11b9f28855abe43cff018 /src/apps/projsync.cpp | |
| parent | a10b5edfad805b1e09d88b31b953707412440b09 (diff) | |
| download | PROJ-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/apps/projsync.cpp')
| -rw-r--r-- | src/apps/projsync.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/apps/projsync.cpp b/src/apps/projsync.cpp index 40848f51..61681260 100644 --- a/src/apps/projsync.cpp +++ b/src/apps/projsync.cpp @@ -137,7 +137,12 @@ int main(int argc, char *argv[]) { } else if (arg == "--user-writable-directory") { // do nothing } else if (arg == "--system-directory") { - targetDir = PROJ_LIB; + targetDir = pj_get_relative_share_proj(ctx); +#ifdef PROJ_LIB + if (targetDir.empty()) { + targetDir = PROJ_LIB; + } +#endif } else if (arg == "--target-dir" && i + 1 < argc) { i++; targetDir = argv[i]; |
