Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: prefer to use use PROJ_SOURCE_DIR and PROJ_BINARY_DIR #2100

Merged
merged 1 commit into from Mar 27, 2020

Conversation

mwtoews
Copy link
Member

@mwtoews mwtoews commented Mar 27, 2020

PROJ_SOURCE_DIR and PROJ_BINARY_DIR are absolute paths to the source and binary build trees for PROJ, whereas CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR refer to the top-level CMakeLists.txt, which could be a different project. Similarly, PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR are relative to the most recent project() command. It's just more direct to make these consistently PROJ_SOURCE_DIR and PROJ_BINARY_DIR.

Other items covered here:

  • Set properties with a list variable rather than a long line
  • Correction to 'proj_test_set_properties' function, rename ENVIRONMENT:
    • PROJ_IGNORE_USER_WRITABLE_DIRECTORY (ignored)
    • PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY (used by filemanager.cpp)

Closes #2094

* Use instead of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR
* Also PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR, which is similar
* Set properties with a list variable rather than a long line
* Correction to 'proj_test_set_properties' function, rename ENVIRONMENT:
  - PROJ_IGNORE_USER_WRITABLE_DIRECTORY     (ignored)
  - PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY  (used by filemanager.cpp)
Copy link
Member

@kbevers kbevers left a comment

Looks good to me!

@mwtoews mwtoews merged commit 54fdb90 into OSGeo:master Mar 27, 2020
5 checks passed
@kbevers kbevers added this to the 7.0.1 milestone Mar 28, 2020
@mwtoews mwtoews deleted the cmake branch Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants