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

write PROJ build dir export rules #1347

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions cpp/cuproj/cmake/thirdparty/get_proj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ function(find_and_configure_proj VERSION)
GIT_TAG ${VERSION}
GIT_SHALLOW TRUE
)

if(PROJ_ADDED)
install(TARGETS proj EXPORT proj-exports)

# write build export rules
rapids_export(
BUILD PROJ
VERSION ${VERSION}
EXPORT_SET proj-exports
GLOBAL_TARGETS proj
NAMESPACE PROJ::)

include("${rapids-cmake-dir}/export/find_package_root.cmake")
# When using cuPROJ from the build dir, ensure PROJ is also found in cuPROJ's build dir. This
# line adds `set(PROJ_ROOT "${CMAKE_CURRENT_LIST_DIR}")` to build/cuproj-dependencies.cmake
rapids_export_find_package_root(
BUILD PROJ [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cuproj-exports
)
endif()

endfunction()

find_and_configure_proj(9.2.0)
Loading