Skip to content

cmake: use of imported PROJ target - #5348

Merged
nilason merged 1 commit into
OSGeo:mainfrom
nilason:fix_cmake_proj
Mar 10, 2025
Merged

cmake: use of imported PROJ target#5348
nilason merged 1 commit into
OSGeo:mainfrom
nilason:fix_cmake_proj

Conversation

@nilason

@nilason nilason commented Mar 9, 2025

Copy link
Copy Markdown
Contributor

Cse imported PROJ target. Update FindPROJ to try Config mode first.

@nilason nilason added this to the 8.5.0 milestone Mar 9, 2025
@github-actions github-actions Bot added vector Related to vector data processing raster Related to raster data processing libraries module general CMake labels Mar 9, 2025
@echoix

echoix commented Mar 9, 2025

Copy link
Copy Markdown
Member

PROJ's cmake docs shows adding the target as PRIVATE (in their example, for target_link_libraries). https://proj.org/en/latest/development/cmake.html

Should we have something equivalent here, if it doesn't already do that?

@nilason

nilason commented Mar 9, 2025

Copy link
Copy Markdown
Contributor Author

PROJ's cmake docs shows adding the target as PRIVATE (in their example, for target_link_libraries). https://proj.org/en/latest/development/cmake.html

Should we have something equivalent here, if it doesn't already do that?

We always do.

target_link_libraries(${G_NAME} PRIVATE ${dep})

@echoix

echoix commented Mar 9, 2025

Copy link
Copy Markdown
Member

PROJ's cmake docs shows adding the target as PRIVATE (in their example, for target_link_libraries). https://proj.org/en/latest/development/cmake.html
Should we have something equivalent here, if it doesn't already do that?

We always do.

target_link_libraries(${G_NAME} PRIVATE ${dep})

That's what I was missing (sorry I didn't follow along too closely for the 2-3 year cmake PR with like 300 commits).

@nilason
nilason merged commit f178edc into OSGeo:main Mar 10, 2025
@nilason
nilason deleted the fix_cmake_proj branch March 10, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake general libraries module raster Related to raster data processing vector Related to vector data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants