[gdal] Apply conditional patching (#5940)

This commit is contained in:
Victor Romero 2019-04-05 01:38:24 -07:00 committed by GitHub
parent 3aa305fa02
commit 03981bb560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 7 deletions

View File

@ -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

View File

@ -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)