Skip to content

Commit ce0f30f

Browse files
Patch PROJ to remove uninstall target
This is interfering with other projects that also have an uninstall target.
1 parent 990dc8a commit ce0f30f

File tree

3 files changed

+55
-6
lines changed

3 files changed

+55
-6
lines changed

Diff for: cpp/cuproj/cmake/patches/proj.patch

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
From 420df6db01107cf7ec5735a9763de719e60b0f38 Mon Sep 17 00:00:00 2001
2+
From: Kyle Edwards <[email protected]>
3+
Date: Tue, 25 Mar 2025 12:42:19 -0400
4+
Subject: [PATCH] Remove uninstall target
5+
6+
This is interfering with other projects that also have an uninstall
7+
target.
8+
---
9+
CMakeLists.txt | 1 -
10+
1 file changed, 1 deletion(-)
11+
12+
diff --git a/CMakeLists.txt b/CMakeLists.txt
13+
index ed7e5bc8..cdd05256 100644
14+
--- a/CMakeLists.txt
15+
+++ b/CMakeLists.txt
16+
@@ -400,4 +400,3 @@ if(NOT _is_multi_config_generator)
17+
endif()
18+
19+
configure_file(cmake/uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/proj_uninstall.cmake @ONLY)
20+
-add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/proj_uninstall.cmake)
21+
--
22+
2.34.1
23+

Diff for: cpp/cuproj/cmake/patches/proj_override.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"packages": {
3+
"PROJ": {
4+
"version": "9.2.0",
5+
"git_url": "https://github.com/osgeo/proj.git",
6+
"git_tag": "${version}",
7+
"patches": [
8+
{
9+
"file": "${current_json_dir}/proj.patch",
10+
"issue": "Remove uninstall target",
11+
"fixed_in": "",
12+
"build": true
13+
}
14+
]
15+
}
16+
}
17+
}

Diff for: cpp/cuproj/cmake/thirdparty/get_proj.cmake

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# =============================================================================
2-
# Copyright (c) 2023, NVIDIA CORPORATION.
2+
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
# in compliance with the License. You may obtain a copy of the License at
@@ -13,19 +13,28 @@
1313
# =============================================================================
1414

1515
# This function finds osgeo/proj and sets any additional necessary environment variables.
16-
function(find_and_configure_proj VERSION)
16+
function(find_and_configure_proj)
17+
include("${rapids-cmake-dir}/cpm/package_override.cmake")
18+
rapids_cpm_package_override("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../patches/proj_override.json")
19+
20+
include("${rapids-cmake-dir}/cpm/detail/package_details.cmake")
21+
rapids_cpm_package_details(PROJ version repository tag shallow exclude)
22+
23+
include("${rapids-cmake-dir}/cpm/detail/generate_patch_command.cmake")
24+
rapids_cpm_generate_patch_command(PROJ ${version} patch_command build_patch_only)
25+
1726
include(${rapids-cmake-dir}/cpm/find.cmake)
1827

1928
# Find or install Proj
2029
rapids_cpm_find(
21-
PROJ ${VERSION}
30+
PROJ ${version} ${build_patch_only}
2231
GLOBAL_TARGETS PROJ::proj
2332
BUILD_EXPORT_SET cuproj-exports
2433
INSTALL_EXPORT_SET cuproj-exports
2534
CPM_ARGS
26-
GIT_REPOSITORY https://github.com/osgeo/proj.git
27-
GIT_TAG ${VERSION}
28-
GIT_SHALLOW TRUE
35+
GIT_REPOSITORY ${repository}
36+
GIT_TAG ${tag}
37+
GIT_SHALLOW ${shallow} ${patch_command}
2938
)
3039

3140
if(PROJ_ADDED)

0 commit comments

Comments
 (0)