Skip to content

Patch PROJ to remove uninstall target #1552

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

Merged
Merged
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions cpp/cuproj/cmake/patches/proj.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 420df6db01107cf7ec5735a9763de719e60b0f38 Mon Sep 17 00:00:00 2001
From: Kyle Edwards <[email protected]>
Date: Tue, 25 Mar 2025 12:42:19 -0400
Subject: [PATCH] Remove uninstall target

This is interfering with other projects that also have an uninstall
target.
---
CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed7e5bc8..cdd05256 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -400,4 +400,3 @@ if(NOT _is_multi_config_generator)
endif()

configure_file(cmake/uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/proj_uninstall.cmake @ONLY)
-add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/proj_uninstall.cmake)
--
2.34.1

17 changes: 17 additions & 0 deletions cpp/cuproj/cmake/patches/proj_override.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"packages": {
"PROJ": {
"version": "9.2.0",
"git_url": "https://github.com/osgeo/proj.git",
"git_tag": "${version}",
"patches": [
{
"file": "${current_json_dir}/proj.patch",
"issue": "Remove uninstall target",
"fixed_in": "",
"build": true
}
]
}
}
}
21 changes: 15 additions & 6 deletions cpp/cuproj/cmake/thirdparty/get_proj.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2023, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -13,19 +13,28 @@
# =============================================================================

# This function finds osgeo/proj and sets any additional necessary environment variables.
function(find_and_configure_proj VERSION)
function(find_and_configure_proj)
include("${rapids-cmake-dir}/cpm/package_override.cmake")
rapids_cpm_package_override("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../patches/proj_override.json")

include("${rapids-cmake-dir}/cpm/detail/package_details.cmake")
rapids_cpm_package_details(PROJ version repository tag shallow exclude)

include("${rapids-cmake-dir}/cpm/detail/generate_patch_command.cmake")
rapids_cpm_generate_patch_command(PROJ ${version} patch_command build_patch_only)

include(${rapids-cmake-dir}/cpm/find.cmake)

# Find or install Proj
rapids_cpm_find(
PROJ ${VERSION}
PROJ ${version} ${build_patch_only}
GLOBAL_TARGETS PROJ::proj
BUILD_EXPORT_SET cuproj-exports
INSTALL_EXPORT_SET cuproj-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/osgeo/proj.git
GIT_TAG ${VERSION}
GIT_SHALLOW TRUE
GIT_REPOSITORY ${repository}
GIT_TAG ${tag}
GIT_SHALLOW ${shallow} ${patch_command}
)

if(PROJ_ADDED)
Expand Down
Loading