mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:23:02 +08:00
[gdal] Apply conditional patching (#5940)
This commit is contained in:
parent
3aa305fa02
commit
03981bb560
@ -1,5 +1,5 @@
|
||||
Source: gdal
|
||||
Version: 2.4.0-1
|
||||
Version: 2.4.0-2
|
||||
Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data.
|
||||
Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5
|
||||
|
||||
|
@ -37,14 +37,23 @@ endif()
|
||||
foreach(BUILD_TYPE IN LISTS BUILD_TYPES)
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
|
||||
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Fix-static-build.patch
|
||||
)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Fix-static-build.patch
|
||||
)
|
||||
else()
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
find_program(NMAKE nmake REQUIRED)
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user