mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 17:59:08 +08:00
b5bb1511f0
* [vcpkg] Add VCPKG_HOST_TRIPLET. Improve vcpkg.schema.json * [many ports] Apply host dependencies * [yasm-tool] Revert yasm-tool changes to split into PR #16478 * [many ports] Add versions * [vcpkg.cmake] Revert change applied in other PR * [boost-modular-build-helper] Merge from master Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
67 lines
2.0 KiB
CMake
67 lines
2.0 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO OSGeo/PROJ
|
|
REF 7.2.1
|
|
SHA512 e6e77266dcd70c939c16667c916cccab8de161221d2ef600cfca43382f50da2dc8d790561556b4416adbb4ac6fba939004e0cc936c278e0e808dc3566e9a70d4
|
|
HEAD_REF master
|
|
PATCHES
|
|
fix-sqlite3-bin.patch
|
|
disable-projdb-with-arm-uwp.patch
|
|
fix-win-output-name.patch
|
|
fix-proj4-targets-cmake.patch
|
|
tools-cmake.patch
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
set(VCPKG_BUILD_SHARED_LIBS ON)
|
|
set(EXTRA_FEATURES tiff ENABLE_TIFF tools BUILD_PROJSYNC tools ENABLE_CURL)
|
|
set(TOOL_NAMES cct cs2cs geod gie proj projinfo projsync)
|
|
else()
|
|
set(VCPKG_BUILD_SHARED_LIBS OFF)
|
|
set(TOOL_NAMES cct cs2cs geod gie proj projinfo)
|
|
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
|
|
${EXTRA_FEATURES}
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
message(WARNING "ENABLE_TIFF ENABLE_CURL and BUILD_PROJSYNC will be off when building static")
|
|
set(FEATURE_OPTIONS ${FEATURE_OPTIONS} -DENABLE_TIFF=OFF -DENABLE_CURL=OFF -DBUILD_PROJSYNC=OFF)
|
|
endif()
|
|
|
|
if ("database" IN_LIST FEATURES)
|
|
set(EXE_SQLITE3 ${CURRENT_HOST_INSTALLED_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX})
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
-DPROJ_LIB_SUBDIR=lib
|
|
-DPROJ_INCLUDE_SUBDIR=include
|
|
-DPROJ_DATA_SUBDIR=share/${PORT}
|
|
-DBUILD_TESTING=OFF
|
|
-DEXE_SQLITE3=${EXE_SQLITE3}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
|
if ("tools" IN_LIST FEATURES)
|
|
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
|
|
endif ()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|