mirror of https://github.com/microsoft/vcpkg.git
[gdal] Fix with current CMake. (#51410)
This commit is contained in:
parent
80f9bcfa45
commit
4c5d418722
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/cmake/modules/packages/FindFreeXL.cmake b/cmake/modules/packages/FindFreeXL.cmake
|
||||
index 6c86fb8..0634412 100644
|
||||
index 2cdb29b..af2bab0 100644
|
||||
--- a/cmake/modules/packages/FindFreeXL.cmake
|
||||
+++ b/cmake/modules/packages/FindFreeXL.cmake
|
||||
@@ -37,7 +37,15 @@ include(SelectLibraryConfigurations)
|
||||
|
|
@ -20,7 +20,7 @@ index 6c86fb8..0634412 100644
|
|||
|
||||
find_path(FREEXL_INCLUDE_DIR
|
||||
diff --git a/cmake/modules/packages/FindOpenJPEG.cmake b/cmake/modules/packages/FindOpenJPEG.cmake
|
||||
index c697484..6e83222 100644
|
||||
index 986c674..7e4bb3c 100644
|
||||
--- a/cmake/modules/packages/FindOpenJPEG.cmake
|
||||
+++ b/cmake/modules/packages/FindOpenJPEG.cmake
|
||||
@@ -32,9 +32,18 @@ endfunction()
|
||||
|
|
@ -44,7 +44,7 @@ index c697484..6e83222 100644
|
|||
|
||||
find_path(OPENJPEG_INCLUDE_DIR opj_config.h
|
||||
diff --git a/cmake/modules/packages/FindPoppler.cmake b/cmake/modules/packages/FindPoppler.cmake
|
||||
index 3807ec0..8059eb4 100644
|
||||
index 0d3fd5e..602d349 100644
|
||||
--- a/cmake/modules/packages/FindPoppler.cmake
|
||||
+++ b/cmake/modules/packages/FindPoppler.cmake
|
||||
@@ -42,11 +42,19 @@ This module defines the following variables:
|
||||
|
|
@ -85,10 +85,10 @@ index 3807ec0..8059eb4 100644
|
|||
NAMES ${Poppler_${_comp}_header}
|
||||
PATH_SUFFIXES poppler
|
||||
diff --git a/cmake/modules/packages/FindSPATIALITE.cmake b/cmake/modules/packages/FindSPATIALITE.cmake
|
||||
index 00612b0..6388719 100644
|
||||
index b7f9ade..d53d511 100644
|
||||
--- a/cmake/modules/packages/FindSPATIALITE.cmake
|
||||
+++ b/cmake/modules/packages/FindSPATIALITE.cmake
|
||||
@@ -38,9 +38,17 @@ endif()
|
||||
@@ -33,9 +33,17 @@ This module defines the following variables:
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
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,8 +1,8 @@
|
|||
diff --git a/cmake/modules/packages/FindLibKML.cmake b/cmake/modules/packages/FindLibKML.cmake
|
||||
index 9418247..589b83d 100644
|
||||
index 05d1ea2..7dcced2 100644
|
||||
--- a/cmake/modules/packages/FindLibKML.cmake
|
||||
+++ b/cmake/modules/packages/FindLibKML.cmake
|
||||
@@ -56,6 +56,8 @@ find_library(LIBKML_BASE_LIBRARY
|
||||
@@ -57,6 +57,8 @@ find_library(LIBKML_BASE_LIBRARY
|
||||
HINTS ${PC_LIBKML_LIBRARY_DIRS} )
|
||||
mark_as_advanced(LIBKML_BASE_LIBRARY)
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ index 9418247..589b83d 100644
|
|||
set(libkml_known_components DOM CONVENIENCE ENGINE REGIONATOR)
|
||||
foreach(_comp IN LISTS libkml_known_components)
|
||||
if(${_comp} IN_LIST LibKML_FIND_COMPONENTS)
|
||||
@@ -99,21 +101,20 @@ find_package_handle_standard_args(LibKML
|
||||
@@ -102,21 +104,20 @@ find_package_handle_standard_args(LibKML
|
||||
if(LIBKML_FOUND)
|
||||
set(LIBKML_INCLUDE_DIRS "${LIBKML_INCLUDE_DIR}")
|
||||
set(LIBKML_LIBRARIES "${LIBKML_BASE_LIBRARY}")
|
||||
|
|
@ -39,7 +39,7 @@ index 9418247..589b83d 100644
|
|||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -129,3 +130,4 @@ if(LIBKML_FOUND)
|
||||
@@ -132,3 +133,4 @@ if(LIBKML_FOUND)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ vcpkg_from_github(
|
|||
HEAD_REF master
|
||||
PATCHES
|
||||
find-link-libraries.patch
|
||||
fix-gdal-target-interfaces.patch
|
||||
iconv.diff
|
||||
libkml.patch
|
||||
sqlite3.diff
|
||||
target-is-valid.patch
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/modules/packages/FindIconv.cmake")
|
||||
# `vcpkg clean` stumbles over one subdir
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/autotest")
|
||||
|
|
@ -162,7 +162,10 @@ file(REMOVE_RECURSE
|
|||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
)
|
||||
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/gdal-config" "${CURRENT_PACKAGES_DIR}/debug/bin/gdal-config")
|
||||
file(REMOVE
|
||||
"${CURRENT_PACKAGES_DIR}/bin/gdal-config"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/gdal-config"
|
||||
)
|
||||
|
||||
file(GLOB bin_files "${CURRENT_PACKAGES_DIR}/bin/*")
|
||||
if(NOT bin_files)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/cmake/modules/packages/FindSQLite3.cmake b/cmake/modules/packages/FindSQLite3.cmake
|
||||
index 903465b3c9..5d3a067e50 100644
|
||||
index a99d5b8..c94a2df 100644
|
||||
--- a/cmake/modules/packages/FindSQLite3.cmake
|
||||
+++ b/cmake/modules/packages/FindSQLite3.cmake
|
||||
@@ -77,7 +77,7 @@ if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)
|
||||
@@ -79,7 +79,7 @@ if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)
|
||||
cmake_push_check_state(RESET)
|
||||
# check column metadata
|
||||
set(CMAKE_REQUIRED_INCLUDES ${SQLite3_INCLUDE_DIR})
|
||||
|
|
@ -11,7 +11,7 @@ index 903465b3c9..5d3a067e50 100644
|
|||
if(PC_SQLITE3_STATIC_LDFLAGS)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${PC_SQLITE3_STATIC_LDFLAGS})
|
||||
else()
|
||||
@@ -111,15 +111,10 @@ if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)
|
||||
@@ -113,15 +113,10 @@ if(SQLite3_INCLUDE_DIR AND SQLite3_LIBRARY)
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${SQLite3_LIBRARY})
|
||||
|
|
@ -29,7 +29,7 @@ index 903465b3c9..5d3a067e50 100644
|
|||
# Invalidate cached variables if SQLite3_LIBRARY changes
|
||||
file(TIMESTAMP "${SQLite3_LIBRARY}" SQLite3_LIBRARY_TIMESTAMP)
|
||||
if( SQLite3_LIBRARY_TIMESTAMP_OLD_VAL AND
|
||||
@@ -179,6 +174,7 @@ if(SQLite3_FOUND)
|
||||
@@ -181,6 +176,7 @@ if(SQLite3_FOUND)
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${SQLite3_LIBRARY}")
|
||||
|
|
@ -37,7 +37,7 @@ index 903465b3c9..5d3a067e50 100644
|
|||
if(SQLite3_HAS_COLUMN_METADATA)
|
||||
set_property(TARGET SQLite::SQLite3 APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS "SQLite3_HAS_COLUMN_METADATA")
|
||||
@@ -187,5 +183,9 @@ if(SQLite3_FOUND)
|
||||
@@ -189,5 +185,14 @@ if(SQLite3_FOUND)
|
||||
set_property(TARGET SQLite::SQLite3 APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS "SQLite3_HAS_RTREE")
|
||||
endif()
|
||||
|
|
@ -45,5 +45,10 @@ index 903465b3c9..5d3a067e50 100644
|
|||
+ if(definitions)
|
||||
+ list(REMOVE_DUPLICATES definitions)
|
||||
+ set_target_properties(SQLite::SQLite3 PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${definitions}")
|
||||
+ endif()
|
||||
+
|
||||
+ # as suggested by https://cmake.org/cmake/help/latest/module/FindSQLite3.html
|
||||
+ if(NOT TARGET SQLite3::SQLite3)
|
||||
+ add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "gdal",
|
||||
"version-semver": "3.12.4",
|
||||
"port-version": 1,
|
||||
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
|
||||
"homepage": "https://gdal.org",
|
||||
"license": null,
|
||||
|
|
|
|||
|
|
@ -3294,7 +3294,7 @@
|
|||
},
|
||||
"gdal": {
|
||||
"baseline": "3.12.4",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"gdbm": {
|
||||
"baseline": "1.24",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "464231a52207efb8065e11adc072063556201e76",
|
||||
"version-semver": "3.12.4",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "aa66d2255b312f5a7541579b6f21507a295bd2c0",
|
||||
"version-semver": "3.12.4",
|
||||
|
|
|
|||
Loading…
Reference in New Issue