aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/proj4/CONTROL6
-rw-r--r--ports/proj4/portfile.cmake16
-rw-r--r--ports/proj4/tools-cmake.patch16
3 files changed, 31 insertions, 7 deletions
diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL
index ef83912c6..d7965472d 100644
--- a/ports/proj4/CONTROL
+++ b/ports/proj4/CONTROL
@@ -1,6 +1,6 @@
Source: proj4
Version: 6.3.1
-Port-Version: 2
+Port-Version: 3
Homepage: https://github.com/OSGeo/PROJ
Description: PROJ.4 library for cartographic projections
Build-Depends: sqlite3[core]
@@ -9,3 +9,7 @@ Default-Features: database
Feature: database
Build-Depends: sqlite3[tool] (!uwp&!arm)
Description: generate database
+
+Feature: tools
+Build-Depends:
+Description: generate tools
diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake
index b669bfd72..c4e5a5ad1 100644
--- a/ports/proj4/portfile.cmake
+++ b/ports/proj4/portfile.cmake
@@ -12,6 +12,7 @@ vcpkg_from_github(
fix-sqlite-dependency-export.patch
fix-linux-build.patch
use-sqlite3-config.patch
+ tools-cmake.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
@@ -22,6 +23,12 @@ endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
database BUILD_PROJ_DATABASE
+ tools BUILD_CCT
+ tools BUILD_CS2CS
+ tools BUILD_GEOD
+ tools BUILD_GIE
+ tools BUILD_PROJ
+ tools BUILD_PROJINFO
)
if ("database" IN_LIST FEATURES)
if (VCPKG_TARGET_IS_WINDOWS)
@@ -53,18 +60,15 @@ vcpkg_configure_cmake(
-DPROJ_LIB_SUBDIR=lib
-DPROJ_INCLUDE_SUBDIR=include
-DPROJ_DATA_SUBDIR=share/proj4
- -DBUILD_CCT=OFF
- -DBUILD_CS2CS=OFF
- -DBUILD_GEOD=OFF
- -DBUILD_GIE=OFF
- -DBUILD_PROJ=OFF
- -DBUILD_PROJINFO=OFF
-DPROJ_TESTS=OFF
-DEXE_SQLITE3=${SQLITE3_BIN_PATH}/sqlite3${BIN_SUFFIX}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/proj4)
+if ("tools" IN_LIST FEATURES)
+ vcpkg_copy_tools(TOOL_NAMES cct cs2cs geod gie proj projinfo AUTO_CLEAN)
+endif ()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
diff --git a/ports/proj4/tools-cmake.patch b/ports/proj4/tools-cmake.patch
new file mode 100644
index 000000000..4e487e6f1
--- /dev/null
+++ b/ports/proj4/tools-cmake.patch
@@ -0,0 +1,16 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 48c785a..e2b5485 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -69,11 +69,3 @@ if(BUILD_GIE)
+ include(bin_gie.cmake)
+ set(BIN_TARGETS ${BIN_TARGETS} gie)
+ endif()
+-
+-if(MSVC OR CMAKE_CONFIGURATION_TYPES)
+- if(BIN_TARGETS)
+- # Add _d suffix for your debug versions of the tools
+- set_target_properties(${BIN_TARGETS} PROPERTIES
+- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+- endif()
+-endif()