diff options
| author | JackBoosY <47264268+JackBoosY@users.noreply.github.com> | 2019-10-18 08:15:52 +0800 |
|---|---|---|
| committer | dan-shaw <51385773+dan-shaw@users.noreply.github.com> | 2019-10-17 17:15:52 -0700 |
| commit | 75dd38cd8a8143d9a77e81da25085ab1b7621cd6 (patch) | |
| tree | 678352df29212b686028d6b52fd4c9513140761c /ports/proj4 | |
| parent | 11ef794475f3de755508a78e139c663c55e69ff7 (diff) | |
| download | vcpkg-75dd38cd8a8143d9a77e81da25085ab1b7621cd6.tar.gz vcpkg-75dd38cd8a8143d9a77e81da25085ab1b7621cd6.zip | |
[proj4] Upgrade version to 6.1.1 and remove patches. (#7917)
* [proj4]Upgrade version to 6.1.1 and remove useless patches.
* [libgeotiff]Fix build errors using proj4 6.1.1.
* [libspatialite]Fix build errors using proj4 6.1.1.
* [gdal]Fix build errors using proj4 6.1.1.
* [spatialite-tools]Fix build errors using proj4 6.1.1.
* [spatialite-tools]Fix build errors using proj4 6.1.1.
* [libgeotiff]Re-fix build errors using proj4 6.1.1.
* [vtk]Fix build errors using proj4 6.1.1.
* [proj4]Fix find sqlite binary failure.
* [proj4]Disable build tools when building proj4 in arm/uwp.
* [sqlite3/libgeotiff]Fix libdl library linkage. Re-fix use proj issue.
* add back dl libs
* [gdal]Fix dependent port proj library name.
* [proj4]Set Windows library name to "proj" and revert fix-proj-name changes.
* [liblas]Fix build errors using proj4 6.1.1.
* [liblas]Fix build errors using proj4 6.1.1.
* [liblas]Fix build errors using proj4 6.1.1.
* [proj4]Fix feature database on triplet arm/uwp.
* [gdal]Remove useless flag PROJ_STATIC.
* [proj4]Fix build error on x64-windows-static.
* [liblas]Use find_library to get proj4/sqlite3 libraries.
* [proj4]Fix sqlite dependency.
* [proj4]Fix arm/uwp dependency.
* [proj4]Fix linux build: configure error.
* [proj4]Disable export proj4 namespace.
* [liblas]Delete proj dependency.
* [libspatialite]Fix linux build.
* [libspatialite]Fix linux command.
* [libspatialite]Fix configure error.
* [proj4]fix static cmake tools path.
* [libgeotiff]Set configure options to 1/0 to avoid the "if" comparison failure in config.cmake.
[proj4]Revert changes about namespace.
[liblas]Remove FindPROJ4.cmake and FindGeoTIFF.cmake from the source.
* [vtk]Fix using latest proj4 issue.
* [proj4]Delete missing patch.
Diffstat (limited to 'ports/proj4')
| -rw-r--r-- | ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch | 26 | ||||
| -rw-r--r-- | ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch | 52 | ||||
| -rw-r--r-- | ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch | 98 | ||||
| -rw-r--r-- | ports/proj4/CONTROL | 10 | ||||
| -rw-r--r-- | ports/proj4/disable-export-namespace.patch | 28 | ||||
| -rw-r--r-- | ports/proj4/disable-projdb-with-arm-uwp.patch | 15 | ||||
| -rw-r--r-- | ports/proj4/fix-linux-build.patch | 18 | ||||
| -rw-r--r-- | ports/proj4/fix-sqlite-dependency-export.patch | 13 | ||||
| -rw-r--r-- | ports/proj4/fix-sqlite3-bin.patch | 13 | ||||
| -rw-r--r-- | ports/proj4/fix-win-output-name.patch | 13 | ||||
| -rw-r--r-- | ports/proj4/portfile.cmake | 97 |
11 files changed, 154 insertions, 229 deletions
diff --git a/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch deleted file mode 100644 index 2f1f9ca29..000000000 --- a/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ca8bb14234091ab7b1ada2b9e5abb04f40d459cb Mon Sep 17 00:00:00 2001 -From: Manuel Massing <Manuel Massing m.massing@warped-space.de> -Date: Tue, 22 Nov 2016 12:00:39 +0100 -Subject: [PATCH 1/3] CMake: add detection of recent visual studio versions - ---- - cmake/Proj4SystemInfo.cmake | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake -index 294a50b..c7fb6bf 100644 ---- a/cmake/Proj4SystemInfo.cmake -+++ b/cmake/Proj4SystemInfo.cmake -@@ -50,6 +50,9 @@ if(WIN32) - if(MSVC_VERSION EQUAL 1800) - set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013 - endif() -+ if(MSVC_VERSION GREATER_EQUAL 1900) -+ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015/2017/2019 -+ endif() - endif(MSVC) - - if(MINGW) --- -2.9.2.windows.1 - diff --git a/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch deleted file mode 100644 index 2c470570e..000000000 --- a/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 1265d13f29259be05535241e9bcbfcf16857dc06 Mon Sep 17 00:00:00 2001 -From: Manuel Massing <Manuel Massing m.massing@warped-space.de> -Date: Tue, 22 Nov 2016 12:04:10 +0100 -Subject: [PATCH 2/3] CMake: fix error by only setting properties for targets - which are actually defined - ---- - src/CMakeLists.txt | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 8d7e7d1..59ad00a 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -22,25 +22,30 @@ if(NOT MSVC) - endif () - endif () - -+ - if(BUILD_CS2CS) -- include(bin_cs2cs.cmake) -+ list(APPEND BINARY_TARGETS cs2cs) -+ include(bin_cs2cs.cmake) - endif(BUILD_CS2CS) - - if(BUILD_PROJ) -+ list(APPEND BINARY_TARGETS proj) - include(bin_proj.cmake) - endif(BUILD_PROJ) - - if(BUILD_GEOD) -+ list(APPEND BINARY_TARGETS geod) - include(bin_geod.cmake) - include(bin_geodtest.cmake) - endif(BUILD_GEOD) - - if(BUILD_NAD2BIN) -+ list(APPEND BINARY_TARGETS nad2bin) - include(bin_nad2bin.cmake) - endif(BUILD_NAD2BIN) - --if (MSVC OR CMAKE_CONFIGURATION_TYPES) -+if ((MSVC OR CMAKE_CONFIGURATION_TYPES) AND BINARY_TARGETS) - # Add _d suffix for your debug versions of the tools -- set_target_properties (cs2cs binproj geod nad2bin PROPERTIES -- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) -+ set_target_properties(${BINARY_TARGETS} PROPERTIES -+ DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) - endif () --- -2.9.2.windows.1 - diff --git a/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch deleted file mode 100644 index 5870e12ea..000000000 --- a/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 0be627798d943558c674d4d92767ca255d847631 Mon Sep 17 00:00:00 2001 -From: Manuel Massing <Manuel Massing m.massing@warped-space.de> -Date: Tue, 22 Nov 2016 12:26:39 +0100 -Subject: [PATCH 3/3] CMake: configurable cmake config install location - ---- - CMakeLists.txt | 1 + - cmake/CMakeLists.txt | 14 +++++++------- - cmake/Proj4InstallPath.cmake | 12 +++++++++--- - 3 files changed, 17 insertions(+), 10 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cde21f0..1b1f892 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -106,6 +106,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in - set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.") - set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.") - set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.") -+set(CMAKEDIR "${DEFAULT_CMAKE_CONFIGDIR}" CACHE PATH "The directory to install cmake files into.") - - ################################################################################# - # Build configured components -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 742da0e..2bdef0d 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -2,13 +2,13 @@ - # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative - # path to the root from there. (Note that the whole install tree can - # be relocated.) --if (NOT WIN32) -- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") -- set (PROJECT_ROOT_DIR "../../..") --else () -- set (INSTALL_CMAKE_DIR "cmake") -- set (PROJECT_ROOT_DIR "..") --endif () -+ -+set (INSTALL_CMAKE_DIR ${CMAKEDIR}) -+if(NOT IS_ABSOLUTE ${INSTALL_CMAKE_DIR}) -+ set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKEDIR}") -+endif() -+ -+file(RELATIVE_PATH PROJECT_ROOT_DIR ${INSTALL_CMAKE_DIR} ${CMAKE_INSTALL_PREFIX}) - - string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) - configure_file (project-config.cmake.in project-config.cmake @ONLY) -diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake -index da1491c..826fb29 100644 ---- a/cmake/Proj4InstallPath.cmake -+++ b/cmake/Proj4InstallPath.cmake -@@ -28,13 +28,15 @@ if(WIN32) - set(DEFAULT_DATA_SUBDIR share) - set(DEFAULT_INCLUDE_SUBDIR local/include) - set(DEFAULT_DOC_SUBDIR share/doc/proj) -+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "cmake") - else() -- # Common locatoins for Unix and Mac OS X -+ # Common locations for Unix and Mac OS X - set(DEFAULT_BIN_SUBDIR bin) - set(DEFAULT_LIB_SUBDIR lib) - set(DEFAULT_DATA_SUBDIR share/proj) - set(DEFAULT_DOC_SUBDIR doc/proj) - set(DEFAULT_INCLUDE_SUBDIR include) -+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "share/cmake/${PROJECT_NAME}") - endif() - - # Locations are changeable by user to customize layout of PDAL installation -@@ -49,19 +51,23 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING - "Subdirectory where data will be installed") - set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING - "Subdirectory where data will be installed") -- -+set(PROJ_CMAKE_CONFIG_SUBDIR ${DEFAULT_CMAKE_CONFIG_SUBDIR} CACHE STRING -+ "Subdirectory where cmake configuration files will be installed") -+ - # Mark *DIR variables as advanced and dedicated to use by power-users only. - mark_as_advanced(PROJ_ROOT_DIR - PROJ_BIN_SUBDIR - PROJ_LIB_SUBDIR - PROJ_INCLUDE_SUBDIR - PROJ_DATA_SUBDIR -- PROJ_DOC_SUBDIR ) -+ PROJ_DOC_SUBDIR -+ PROJ_CMAKE_CONFIG_SUBDIR) - - set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}") - set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}") - set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}") - set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}") - set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}") -+set(DEFAULT_CMAKE_CONFIGDIR "${PROJ_CMAKE_CONFIG_SUBDIR}") - - --- -2.9.2.windows.1 - diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL index 790b8f70f..6a9647493 100644 --- a/ports/proj4/CONTROL +++ b/ports/proj4/CONTROL @@ -1,4 +1,10 @@ Source: proj4 -Version: 4.9.3-5 -Homepage: https://download.osgeo.org/proj +Version: 6.1.1-1 +Homepage: https://github.com/OSGeo/PROJ Description: PROJ.4 library for cartographic projections +Build-Depends: sqlite3[core] +Default-Features: database + +Feature: database +Build-Depends: sqlite3[tool] (!uwp&!arm) +Description: generate database
\ No newline at end of file diff --git a/ports/proj4/disable-export-namespace.patch b/ports/proj4/disable-export-namespace.patch new file mode 100644 index 000000000..87646fe3d --- /dev/null +++ b/ports/proj4/disable-export-namespace.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 61c69f7..777b5d8 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -28,7 +28,3 @@ install(FILES + install(EXPORT targets + FILE ${PROJECT_NAME_LOWER}-targets.cmake + DESTINATION "${CMAKECONFIGDIR}") +-install(EXPORT targets +- NAMESPACE ${PROJECT_NAME}:: +- FILE ${PROJECT_NAME_LOWER}-namespace-targets.cmake +- DESTINATION "${CMAKECONFIGDIR}") +diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in +index c62ecb4..9a52b3b 100644 +--- a/cmake/project-config.cmake.in ++++ b/cmake/project-config.cmake.in +@@ -20,10 +20,9 @@ set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@") + set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@") + set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@") + +-set (@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::proj) ++set (@PROJECT_NAME@_LIBRARIES proj) + # Read in the exported definition of the library + include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake") +-include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake") + + unset (_ROOT) + unset (_DIR) diff --git a/ports/proj4/disable-projdb-with-arm-uwp.patch b/ports/proj4/disable-projdb-with-arm-uwp.patch new file mode 100644 index 000000000..218a35335 --- /dev/null +++ b/ports/proj4/disable-projdb-with-arm-uwp.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9213990..f51cc5e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -224,7 +224,9 @@ set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}" + include_directories(${PROJ4_SOURCE_DIR}/src) + + message(STATUS "") +-add_subdirectory(data) ++if(BUILD_PROJ_DATABASE) ++ add_subdirectory(data) ++endif() + add_subdirectory(include) + add_subdirectory(src) + add_subdirectory(man) diff --git a/ports/proj4/fix-linux-build.patch b/ports/proj4/fix-linux-build.patch new file mode 100644 index 000000000..0d81ef35d --- /dev/null +++ b/ports/proj4/fix-linux-build.patch @@ -0,0 +1,18 @@ +diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake +index cf7533b..236581f 100644 +--- a/src/lib_proj.cmake ++++ b/src/lib_proj.cmake +@@ -431,11 +431,11 @@ set(PROJ_LIBRARIES ${PROJ_LIBRARIES} PARENT_SCOPE) + if(UNIX) + find_library(M_LIB m) + if(M_LIB) +- target_link_libraries(${PROJ_CORE_TARGET} -lm) ++ target_link_libraries(${PROJ_CORE_TARGET} PRIVATE -lm) + endif() + endif() + if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) +- target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT}) ++ target_link_libraries(${PROJ_CORE_TARGET} PRIVATE ${CMAKE_THREAD_LIBS_INIT}) + endif() + + include_directories(${SQLITE3_INCLUDE_DIR}) diff --git a/ports/proj4/fix-sqlite-dependency-export.patch b/ports/proj4/fix-sqlite-dependency-export.patch new file mode 100644 index 000000000..a7f051699 --- /dev/null +++ b/ports/proj4/fix-sqlite-dependency-export.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake +index 5a0a807..f7bfffd 100644 +--- a/src/lib_proj.cmake ++++ b/src/lib_proj.cmake +@@ -439,7 +439,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) + endif() + + include_directories(${SQLITE3_INCLUDE_DIR}) +-target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY}) ++target_link_libraries(${PROJ_CORE_TARGET} PUBLIC ${SQLITE3_LIBRARY}) + + if(MSVC) + target_compile_definitions(${PROJ_CORE_TARGET} diff --git a/ports/proj4/fix-sqlite3-bin.patch b/ports/proj4/fix-sqlite3-bin.patch new file mode 100644 index 000000000..20fea7141 --- /dev/null +++ b/ports/proj4/fix-sqlite3-bin.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75c4696..2e8a957 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,7 +110,7 @@ include(policies) + ################################################################################ + # Check for sqlite3 + ################################################################################ +-find_program(EXE_SQLITE3 sqlite3) ++# Use incoming parameter + if(NOT EXE_SQLITE3) + message(SEND_ERROR "sqlite3 binary not found!") + endif() diff --git a/ports/proj4/fix-win-output-name.patch b/ports/proj4/fix-win-output-name.patch new file mode 100644 index 000000000..5964d11be --- /dev/null +++ b/ports/proj4/fix-win-output-name.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake +index 1a2b605..cf62f02 100644 +--- a/cmake/ProjUtilities.cmake ++++ b/cmake/ProjUtilities.cmake +@@ -104,7 +104,7 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME) + + # On Windows, ABI version is specified using binary file name suffix. + # On Unix, suffix is empty and SOVERSION is used instead. +- if(WIN32) ++ if(0) + string(LENGTH "${${PROJECT_INTERN_NAME}_ABI_VERSION}" abilen) + if(abilen GREATER 0) + set(SUFFIX "_${${PROJECT_INTERN_NAME}_ABI_VERSION}") diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 70878aae6..7d9c311ca 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -1,21 +1,17 @@ include(vcpkg_common_functions) -set(PROJ4_VERSION 4.9.3) - -vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/proj/proj-${PROJ4_VERSION}.zip" - FILENAME "proj-${PROJ4_VERSION}.zip" - SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631 -) - -vcpkg_extract_source_archive_ex( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - REF ${PROJ4_VERSION} + REPO OSGeo/PROJ + REF 6.1.1 + SHA512 d7c13eec5bc75ace132b7a35118b0e254b9e766cad7bfe23f8d1ec52c32e388607b4f04e9befceef8185e25b98c678c492a6319d19a5e62d074a6d23474b68fa + HEAD_REF master PATCHES - 0001-CMake-add-detection-of-recent-visual-studio-versions.patch - 0002-CMake-fix-error-by-only-setting-properties-for-targe.patch - 0003-CMake-configurable-cmake-config-install-location.patch + fix-sqlite3-bin.patch + disable-projdb-with-arm-uwp.patch + fix-win-output-name.patch + fix-sqlite-dependency-export.patch + fix-linux-build.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -24,53 +20,52 @@ else() set(VCPKG_BUILD_SHARED_LIBS OFF) endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + database BUILD_PROJ_DATABASE +) + +if ("database" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + set(BIN_SUFFIX .exe) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/sqlite3-bin.exe) + message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x86-windows first.") + endif() + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows/tools) + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 OR (VCPKG_TARGET_ARCHITECTURE STREQUAL x64 AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)) + if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/sqlite3-bin.exe) + message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x64-windows first.") + endif() + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows/tools) + else() + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/tools) + endif() + else() + set(BIN_SUFFIX) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/tools) + endif() +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -DBUILD_LIBPROJ_SHARED=${VCPKG_BUILD_SHARED_LIBS} -DPROJ_LIB_SUBDIR=lib -DPROJ_INCLUDE_SUBDIR=include -DPROJ_DATA_SUBDIR=share/proj4 - -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj4 - -DBUILD_CS2CS=NO - -DBUILD_PROJ=NO - -DBUILD_GEOD=NO - -DBUILD_NAD2BIN=NO - -DPROJ4_TESTS=NO + -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${BIN_SUFFIX} ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() - -# Rename library and adapt cmake configuration -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) - string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") -endif() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) - string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") -endif() - -file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake _contents) -string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" - "set(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\")\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - _contents "${_contents}" -) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") - -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) - endif() -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/proj4) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) |
