mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 06:03:02 +08:00
[gdal] Update to v3.5.2 (#26676)
* Remove obsolete file * Omit libspatialite on uwp [skip actions] * Update to 3.5.2 * Update versions * Use unofficial-libmariadb config * Update versions * Ensure host path setup * Merge BUILD_TOOLS into FEATURE_OPTIONS * Update versions * gdal_target_interfaces must recurse * Update versions * CI [skip actions] Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
This commit is contained in:
parent
5f6a2ed8cf
commit
1ea1da790e
@ -1,45 +0,0 @@
|
||||
diff --git a/cmake/helpers/configure.cmake b/cmake/helpers/configure.cmake
|
||||
index 652edf1..0d1441b 100644
|
||||
--- a/cmake/helpers/configure.cmake
|
||||
+++ b/cmake/helpers/configure.cmake
|
||||
@@ -42,6 +42,10 @@ check_type_size("int" SIZEOF_INT)
|
||||
check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
|
||||
check_type_size("void*" SIZEOF_VOIDP)
|
||||
|
||||
+if(MSVC AND NOT BUILD_SHARED_LIBS)
|
||||
+ set(CPL_DISABLE_DLL 1)
|
||||
+endif()
|
||||
+
|
||||
if (MSVC)
|
||||
set(HAVE_VSNPRINTF 1)
|
||||
|
||||
diff --git a/cmake/template/cpl_config.h.in b/cmake/template/cpl_config.h.in
|
||||
index c85d3b0..19d3f0a 100644
|
||||
--- a/cmake/template/cpl_config.h.in
|
||||
+++ b/cmake/template/cpl_config.h.in
|
||||
@@ -177,6 +177,9 @@
|
||||
/* Define to 1 if the compiler supports -Wzero-as-null-pointer-constant */
|
||||
#cmakedefine HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT @HAVE_GCC_WARNING_ZERO_AS_NULL_POINTER_CONSTANT@
|
||||
|
||||
+/* Define if building a static windows lib */
|
||||
+#cmakedefine CPL_DISABLE_DLL @CPL_DISABLE_DLL@
|
||||
+
|
||||
/* Define to 1 if you have the <atlbase.h> header file. */
|
||||
#cmakedefine HAVE_ATLBASE_H 1
|
||||
|
||||
diff --git a/gdal.cmake b/gdal.cmake
|
||||
index ff1ca7e..7712f1d 100644
|
||||
--- a/gdal.cmake
|
||||
+++ b/gdal.cmake
|
||||
@@ -336,11 +336,6 @@ if (MINGW AND BUILD_SHARED_LIBS)
|
||||
set_target_properties(${GDAL_LIB_TARGET_NAME} PROPERTIES SUFFIX "-${GDAL_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif ()
|
||||
|
||||
-
|
||||
-if (MSVC AND NOT BUILD_SHARED_LIBS)
|
||||
- target_compile_definitions(${GDAL_LIB_TARGET_NAME} PUBLIC CPL_DISABLE_DLL=)
|
||||
-endif ()
|
||||
-
|
||||
if (MINGW)
|
||||
if (TARGET_CPU MATCHES "x86_64")
|
||||
add_definitions(-m64)
|
@ -1,219 +0,0 @@
|
||||
macro(find_dependency_win)
|
||||
# curl
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX CURL MODULES --msvc-syntax libcurl INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "CURL_INC=${CURL_INCLUDE_DIRS_RELEASE}" "CURL_LIB=${CURL_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "CURL_INC=${CURL_INCLUDE_DIRS_DEBUG}" "CURL_LIB=${CURL_LIBS_DEBUG}")
|
||||
|
||||
# expat
|
||||
list(APPEND NMAKE_OPTIONS "EXPAT_DIR=YES")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX EXPAT MODULES --msvc-syntax expat INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "EXPAT_INCLUDE=${EXPAT_INCLUDE_DIRS}" "EXPAT_LIB=${EXPAT_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "EXPAT_INCLUDE=${EXPAT_INCLUDE_DIRS}" "EXPAT_LIB=${EXPAT_LIBS_DEBUG}")
|
||||
|
||||
# geos
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX GEOS MODULES --msvc-syntax geos INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "GEOS_CFLAGS=${GEOS_INCLUDE_DIRS_RELEASE} -DHAVE_GEOS" "GEOS_LIB=${GEOS_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "GEOS_CFLAGS=${GEOS_INCLUDE_DIRS_DEBUG} -DHAVE_GEOS" "GEOS_LIB=${GEOS_LIBS_DEBUG}")
|
||||
|
||||
# libgeotiff
|
||||
list(APPEND NMAKE_OPTIONS "GEOTIFF_INC=-I${CURRENT_INSTALLED_DIR}/include")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
list(APPEND NMAKE_OPTIONS_REL "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/lib/geotiff_i.lib")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/geotiff_d_i.lib")
|
||||
else()
|
||||
# libgeotiff may need tiff and proj4, but these are added separately, with all transitive deps.
|
||||
list(APPEND NMAKE_OPTIONS_REL "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/lib/geotiff.lib")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "GEOTIFF_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/geotiff_d.lib")
|
||||
endif()
|
||||
|
||||
# libiconv
|
||||
# There is no pc file, and CMake added the Find module in version 3.11.
|
||||
list(APPEND extra_exports ICONV)
|
||||
set(ICONV_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib")
|
||||
set(ICONV_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib")
|
||||
list(APPEND NMAKE_OPTIONS "LIBICONV_INCLUDE=-I${CURRENT_INSTALLED_DIR}/include" "LIBICONV_CFLAGS=-DICONV_CONST=")
|
||||
list(APPEND NMAKE_OPTIONS_REL "LIBICONV_LIBRARY=${ICONV_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "LIBICONV_LIBRARY=${ICONV_LIBS_DEBUG}")
|
||||
|
||||
# libjpeg-turbo
|
||||
list(APPEND NMAKE_OPTIONS "JPEG_EXTERNAL_LIB=1" "JPEGDIR=${CURRENT_INSTALLED_DIR}/include")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX JPEG MODULES --msvc-syntax libjpeg LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "JPEG_LIB=${JPEG_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "JPEG_LIB=${JPEG_LIBS_DEBUG}")
|
||||
|
||||
# liblzma
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX LZMA MODULES --msvc-syntax liblzma INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "LZMA_CFLAGS=${LZMA_INCLUDE_DIRS_RELEASE}" "LZMA_LIBS=${LZMA_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "LZMA_CFLAGS=${LZMA_INCLUDE_DIRS_DEBUG}" "LZMA_LIBS=${LZMA_LIBS_DEBUG}")
|
||||
|
||||
# libpng
|
||||
list(APPEND NMAKE_OPTIONS "PNG_EXTERNAL_LIB=1" "PNGDIR=${CURRENT_INSTALLED_DIR}/include")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX PNG MODULES --msvc-syntax libpng LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "PNG_LIB=${PNG_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "PNG_LIB=${PNG_LIBS_DEBUG}")
|
||||
|
||||
# libwebp
|
||||
list(APPEND NMAKE_OPTIONS "WEBP_ENABLED=YES")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX WEBP MODULES --msvc-syntax libwebp INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "WEBP_CFLAGS=${WEBP_INCLUDE_DIRS_RELEASE}" "WEBP_LIBS=${WEBP_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "WEBP_CFLAGS=${WEBP_INCLUDE_DIRS_DEBUG}" "WEBP_LIBS=${WEBP_LIBS_DEBUG}")
|
||||
|
||||
# libxml2
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX LIBXML2 MODULES --msvc-syntax libxml-2.0 INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "LIBXML2_INC=${LIBXML2_INCLUDE_DIRS_RELEASE}" "LIBXML2_LIB=${LIBXML2_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "LIBXML2_INC=${LIBXML2_INCLUDE_DIRS_DEBUG}" "LIBXML2_LIB=${LIBXML2_LIBS_DEBUG}")
|
||||
|
||||
# openjpeg
|
||||
list(APPEND NMAKE_OPTIONS "OPENJPEG_ENABLED=YES")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX OPENJPEG MODULES --msvc-syntax libopenjp2 INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "OPENJPEG_CFLAGS=${OPENJPEG_INCLUDE_DIRS_RELEASE}" "OPENJPEG_LIB=${OPENJPEG_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "OPENJPEG_CFLAGS=${OPENJPEG_INCLUDE_DIRS_DEBUG}" "OPENJPEG_LIB=${OPENJPEG_LIBS_DEBUG}")
|
||||
|
||||
# proj
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX PROJ MODULES --msvc-syntax proj INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "PROJ_INCLUDE=${PROJ_INCLUDE_DIRS_RELEASE}" "PROJ_LIBRARY=${PROJ_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "PROJ_INCLUDE=${PROJ_INCLUDE_DIRS_DEBUG}" "PROJ_LIBRARY=${PROJ_LIBS_DEBUG}")
|
||||
|
||||
# sqlite3 and spatialite
|
||||
if ("libspatialite" IN_LIST FEATURES)
|
||||
list(APPEND extra_exports SPATIALITE)
|
||||
list(APPEND NMAKE_OPTIONS "SPATIALITE_412_OR_LATER=yes")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX SQLITE MODULES --msvc-syntax spatialite sqlite3 INCLUDE_DIRS LIBS)
|
||||
string(APPEND SQLITE_INCLUDE_DIRS_RELEASE " -DHAVE_SPATIALITE")
|
||||
string(APPEND SQLITE_INCLUDE_DIRS_DEBUG " -DHAVE_SPATIALITE")
|
||||
else()
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX SQLITE MODULES --msvc-syntax sqlite3 INCLUDE_DIRS LIBS)
|
||||
endif()
|
||||
list(APPEND NMAKE_OPTIONS_REL "SQLITE_INC=${SQLITE_INCLUDE_DIRS_RELEASE}" "SQLITE_LIB=${SQLITE_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "SQLITE_INC=${SQLITE_INCLUDE_DIRS_DEBUG}" "SQLITE_LIB=${SQLITE_LIBS_DEBUG}")
|
||||
|
||||
# tiff
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX TIFF MODULES --msvc-syntax libtiff-4 INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "TIFF_INC=${TIFF_INCLUDE_DIRS_RELEASE} -DBIGTIFF_SUPPORT" "TIFF_LIB=${TIFF_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "TIFF_INC=${TIFF_INCLUDE_DIRS_DEBUG} -DBIGTIFF_SUPPORT" "TIFF_LIB=${TIFF_LIBS_DEBUG}")
|
||||
|
||||
# zlib
|
||||
list(APPEND NMAKE_OPTIONS "ZLIB_EXTERNAL_LIB=1")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX ZLIB MODULES --msvc-syntax zlib INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "ZLIB_INC=${ZLIB_INCLUDE_DIRS_RELEASE}" "ZLIB_LIB=${ZLIB_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "ZLIB_INC=${ZLIB_INCLUDE_DIRS_DEBUG}" "ZLIB_LIB=${ZLIB_LIBS_DEBUG}")
|
||||
|
||||
# zstd
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX ZSTD MODULES --msvc-syntax libzstd INCLUDE_DIRS LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "ZSTD_CFLAGS=${ZSTD_INCLUDE_DIRS_RELEASE}" "ZSTD_LIBS=${ZSTD_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "ZSTD_CFLAGS=${ZSTD_INCLUDE_DIRS_DEBUG}" "ZSTD_LIBS=${ZSTD_LIBS_DEBUG}")
|
||||
|
||||
# Features
|
||||
|
||||
if ("cfitsio" IN_LIST FEATURES)
|
||||
list(APPEND NMAKE_OPTIONS "FITS_INC_DIR=${CURRENT_INSTALLED_DIR}/include" "FITS_PLUGIN=NO")
|
||||
list(APPEND NMAKE_OPTIONS_REL "FITS_LIB=${CURRENT_INSTALLED_DIR}/lib/cfitsio.lib")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "FITS_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/cfitsio.lib")
|
||||
endif()
|
||||
|
||||
if("hdf5" IN_LIST FEATURES)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" HDF5_DIR)
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX HDF5 MODULES --msvc-syntax hdf5 LIBS)
|
||||
list(APPEND NMAKE_OPTIONS "HDF5_DIR=${HDF5_DIR}" "HDF5_PLUGIN=NO")
|
||||
list(APPEND NMAKE_OPTIONS_REL "HDF5_LIB=${HDF5_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "HDF5_LIB=${HDF5_LIBS_DEBUG}")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
list(APPEND NMAKE_OPTIONS "HDF5_H5_IS_DLL=YES")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("mysql-libmariadb" IN_LIST FEATURES)
|
||||
list(APPEND NMAKE_OPTIONS "MYSQL_INC_DIR=${CURRENT_INSTALLED_DIR}/include/mysql")
|
||||
list(APPEND NMAKE_OPTIONS_REL "MYSQL_LIB=${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "MYSQL_LIB=${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib")
|
||||
endif()
|
||||
|
||||
if("netcdf" IN_LIST FEATURES)
|
||||
list(APPEND NMAKE_OPTIONS "NETCDF_INC_DIR=${CURRENT_INSTALLED_DIR}/include" "NETCDF_SETTING=yes" "NETCDF_PLUGIN=NO")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX NETCDF MODULES --msvc-syntax netcdf LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "NETCDF_LIB=${NETCDF_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "NETCDF_LIB=${NETCDF_LIBS_DEBUG}")
|
||||
endif()
|
||||
|
||||
if("poppler" IN_LIST FEATURES)
|
||||
list(APPEND NMAKE_OPTIONS "POPPLER_ENABLED=YES")
|
||||
list(APPEND NMAKE_OPTIONS "POPPLER_MAJOR_VERSION=22" "POPPLER_MINOR_VERSION=3") # Bump as needed
|
||||
list(APPEND NMAKE_OPTIONS "POPPLER_CFLAGS=-I${CURRENT_INSTALLED_DIR}/include -I${CURRENT_INSTALLED_DIR}/include/poppler /std:c++17")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX POPPLER MODULES --msvc-syntax poppler LIBS)
|
||||
list(APPEND NMAKE_OPTIONS_REL "POPPLER_LIBS=${POPPLER_LIBS_RELEASE}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "POPPLER_LIBS=${POPPLER_LIBS_DEBUG}")
|
||||
endif()
|
||||
|
||||
if("postgresql" IN_LIST FEATURES)
|
||||
list(APPEND NMAKE_OPTIONS "PG_INC_DIR=${CURRENT_INSTALLED_DIR}/include")
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX OPENSSL MODULES --msvc-syntax openssl LIBS)
|
||||
set(PGSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libpq.lib ${CURRENT_INSTALLED_DIR}/lib/libpgcommon.lib ${CURRENT_INSTALLED_DIR}/lib/libpgport.lib")
|
||||
list(APPEND NMAKE_OPTIONS_REL "PG_LIB=${PGSQL_LIBRARY_REL} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBS_RELEASE}")
|
||||
set(PGSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpq.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libpgcommon.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libpgport.lib")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "PG_LIB=${PGSQL_LIBRARY_DBG} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBS_DEBUG}")
|
||||
endif()
|
||||
|
||||
# Dependencies which are not in vpckg.json
|
||||
|
||||
# cryptopp
|
||||
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CRYPTOPP_INCLUDE)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/cryptopp-static.lib" CRYPTOPP_LIBRARY_DBG)
|
||||
list(APPEND NMAKE_OPTIONS "CRYPTOPP_INC=-I${CRYPTOPP_INCLUDE}")
|
||||
list(APPEND NMAKE_OPTIONS_REL "CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_REL}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "CRYPTOPP_LIB=${CRYPTOPP_LIBRARY_DBG}")
|
||||
endif()
|
||||
|
||||
# freexl
|
||||
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/freexl.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" FREEXL_INCLUDE)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/freexl.lib" FREEXL_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib" FREEXL_LIBRARY_DBG)
|
||||
list(APPEND NMAKE_OPTIONS "FREEXL_CFLAGS=-I${FREEXL_INCLUDE}")
|
||||
list(APPEND NMAKE_OPTIONS_REL "FREEXL_LIBS=${FREEXL_LIBRARY_REL}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "FREEXL_LIBS=${FREEXL_LIBRARY_DBG}")
|
||||
endif()
|
||||
|
||||
# libkml
|
||||
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" LIBKML_DIR)
|
||||
list(APPEND NMAKE_OPTIONS "LIBKML_DIR=${LIBKML_DIR}")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LIBKML_INCLUDE)
|
||||
list(APPEND NMAKE_OPTIONS "LIBKML_INCLUDE=-I${LIBKML_INCLUDE}")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlbase.lib" KMLBASE_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlbase.lib" KMLBASE_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlconvenience.lib" KMLCONVENIENCE_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlconvenience.lib" KMLCONVENIENCE_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmldom.lib" KMLDOM_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmldom.lib" KMLDOM_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlengine.lib" KMLENGINE_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlengine.lib" KMLENGINE_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlregionator.lib" KMLREGIONATOR_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlregionator.lib" KMLREGIONATOR_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/kmlxsd.lib" KMLXSD_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/kmlxsd.lib" KMLXSD_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/bz2.lib" BZIP2_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/bz2d.lib" BZIP2_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/minizip.lib" MINIZIP_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/minizip.lib" MINIZIP_DBG)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/uriparser.lib" URIPARSER_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/uriparser.lib" URIPARSER_DBG)
|
||||
list(APPEND NMAKE_OPTIONS_REL "LIBKML_LIBS=${KMLBASE_REL} ${KMLCONVENIENCE_REL} ${KMLDOM_REL} ${KMLENGINE_REL} ${KMLREGIONATOR_REL} ${KMLXSD_REL} ${BZIP2_REL} ${MINIZIP_REL} ${URIPARSER_REL} ${EXPAT_LIBRARY_REL} ${ZLIB_LIBRARY_REL}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "LIBKML_LIBS=${KMLBASE_DBG} ${KMLCONVENIENCE_DBG} ${KMLDOM_DBG} ${KMLENGINE_DBG} ${KMLREGIONATOR_DBG} ${KMLXSD_DBG} ${BZIP2_DBG} ${MINIZIP_DBG} ${URIPARSER_DBG} ${EXPAT_LIBRARY_DBG} ${ZLIB_LIBRARY_DBG}")
|
||||
endif()
|
||||
|
||||
# xerces-c
|
||||
if("system-libraries" IN_LIST FEATURES AND EXISTS "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" XERCES_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" XERCES_INCLUDE)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/xerces-c_3.lib" XERCES_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/xerces-c_3D.lib" XERCES_LIBRARY_DBG)
|
||||
list(APPEND NMAKE_OPTIONS ILI_ENABLED=YES)
|
||||
list(APPEND NMAKE_OPTIONS "XERCES_DIR=${XERCES_DIR}")
|
||||
list(APPEND NMAKE_OPTIONS "XERCES_INCLUDE=-I${XERCES_INCLUDE} -I${XERCES_INCLUDE}/xercesc")
|
||||
list(APPEND NMAKE_OPTIONS_REL "XERCES_LIB=${XERCES_LIBRARY_REL}")
|
||||
list(APPEND NMAKE_OPTIONS_DBG "XERCES_LIB=${XERCES_LIBRARY_DBG}")
|
||||
endif()
|
||||
|
||||
endmacro()
|
15
ports/gdal/fix-gdal-target-interfaces.patch
Normal file
15
ports/gdal/fix-gdal-target-interfaces.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake
|
||||
index 838f0fd..380e20d 100644
|
||||
--- a/cmake/helpers/GdalDriverHelper.cmake
|
||||
+++ b/cmake/helpers/GdalDriverHelper.cmake
|
||||
@@ -248,6 +248,10 @@ function(gdal_target_interfaces _TARGET)
|
||||
if (_res)
|
||||
target_compile_options(${_TARGET} PRIVATE ${_res})
|
||||
endif ()
|
||||
+ get_property(_res TARGET ${_LIB} PROPERTY INTERFACE_LINK_LIBRARIES)
|
||||
+ if (_res)
|
||||
+ gdal_target_interfaces(${_TARGET} ${_res})
|
||||
+ endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endfunction()
|
@ -1,12 +1,12 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO OSGeo/gdal
|
||||
REF v3.5.1
|
||||
SHA512 658e515a16ed2b45a0b3dffa6bb23f28d6454a902d8d9efbed320e353112463ff8e9c3efd5b6c98cf61cf187dc88a0dd13f4989041acc836de2b9c07e8da32e9
|
||||
REF v3.5.2
|
||||
SHA512 fece50709090e21200298cf0d5c0dd10418bb800a3c92fb77eedab42c3942169bf69abcad9a6d61d3368ac5265e053e8c2aeb361d297ed0ace92ffba3b21dbca
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
find-link-libraries.patch
|
||||
cpl-disable-dll.patch
|
||||
fix-gdal-target-interfaces.patch
|
||||
)
|
||||
# `vcpkg clean` stumbles over one subdir
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/autotest")
|
||||
@ -50,16 +50,12 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
default-features GDAL_USE_WEBP
|
||||
core GDAL_USE_ZLIB
|
||||
default-features GDAL_USE_ZSTD
|
||||
tools BUILD_APPS
|
||||
)
|
||||
if(GDAL_USE_ICONV AND VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND FEATURE_OPTIONS -D_ICONV_SECOND_ARGUMENT_IS_NOT_CONST=ON)
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS_RELEASE
|
||||
FEATURES
|
||||
tools BUILD_APPS
|
||||
)
|
||||
|
||||
# Compatibility with older Android versions https://github.com/OSGeo/gdal/pull/5941
|
||||
if(VCPKG_TARGET_IS_ANDROID AND ANRDOID_PLATFORM VERSION_LESS 24 AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm"))
|
||||
list(APPEND FEATURE_OPTIONS -DBUILD_WITHOUT_64BIT_OFFSET=ON)
|
||||
@ -70,6 +66,7 @@ string(REPLACE "dynamic" "" qhull_target "Qhull::qhull${VCPKG_LIBRARY_LINKAGE}_r
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DVCPKG_HOST_TRIPLET=${HOST_TRIPLET} # for host pkgconf in PATH
|
||||
${FEATURE_OPTIONS}
|
||||
-DBUILD_DOCS=OFF
|
||||
-DBUILD_PYTHON_BINDINGS=OFF
|
||||
@ -83,13 +80,14 @@ vcpkg_cmake_configure(
|
||||
-DGDAL_USE_EXTERNAL_LIBS=OFF
|
||||
-DGDAL_BUILD_OPTIONAL_DRIVERS=ON
|
||||
-DOGR_BUILD_OPTIONAL_DRIVERS=ON
|
||||
-DGDAL_CHECK_PACKAGE_MySQL_NAMES=unofficial-libmariadb
|
||||
-DGDAL_CHECK_PACKAGE_MySQL_TARGETS=unofficial::libmariadb
|
||||
-DMYSQL_LIBRARIES=unofficial::libmariadb
|
||||
-DGDAL_CHECK_PACKAGE_NetCDF_NAMES=netCDF
|
||||
-DGDAL_CHECK_PACKAGE_NetCDF_TARGETS=netCDF::netcdf
|
||||
-DGDAL_CHECK_PACKAGE_QHULL_NAMES=Qhull
|
||||
"-DGDAL_CHECK_PACKAGE_QHULL_TARGETS=${qhull_target}"
|
||||
"-DQHULL_LIBRARY=${qhull_target}"
|
||||
OPTIONS_RELEASE
|
||||
${FEATURE_OPTIONS_RELEASE}
|
||||
OPTIONS_DEBUG
|
||||
-DBUILD_APPS=OFF
|
||||
)
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "gdal",
|
||||
"version-semver": "3.5.1",
|
||||
"port-version": 6,
|
||||
"version-semver": "3.5.2",
|
||||
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
|
||||
"homepage": "https://gdal.org",
|
||||
"license": null,
|
||||
@ -64,7 +63,6 @@
|
||||
"features": [
|
||||
"curl",
|
||||
"geos",
|
||||
"libspatialite",
|
||||
"recommended-features"
|
||||
]
|
||||
},
|
||||
@ -72,6 +70,7 @@
|
||||
"name": "gdal",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"libspatialite",
|
||||
"postgresql"
|
||||
],
|
||||
"platform": "!uwp"
|
||||
|
@ -2517,8 +2517,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"gdal": {
|
||||
"baseline": "3.5.1",
|
||||
"port-version": 6
|
||||
"baseline": "3.5.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"gdcm": {
|
||||
"baseline": "3.0.12",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f88341b75df68d585c06df3ed7b7b0a5412ae986",
|
||||
"version-semver": "3.5.2",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "548d8ee81b0b34493dc57b3610fb19db2403bb50",
|
||||
"version-semver": "3.5.1",
|
||||
|
Loading…
Reference in New Issue
Block a user