Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support opening of 7z and rar archives as standalone datasets #5780

Merged
merged 5 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core/qgismobileapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,11 +841,11 @@ void QgisMobileapp::readProjectFile()
QgsRectangle extent;

QStringList files;
if ( suffix == QStringLiteral( "zip" ) )
if ( suffix == QStringLiteral( "zip" ) || suffix == QStringLiteral( "7z" ) || suffix == QStringLiteral( "rar" ) )
{
// get list of files inside zip file
QString tmpPath;
char **papszSiblingFiles = VSIReadDirRecursive( QString( "/vsizip/" + mProjectFilePath ).toLocal8Bit().constData() );
char **papszSiblingFiles = VSIReadDirRecursive( QStringLiteral( "/vsi%1/%2" ).arg( suffix, mProjectFilePath ).toLocal8Bit().constData() );
if ( papszSiblingFiles )
{
for ( int i = 0; papszSiblingFiles[i]; i++ )
Expand All @@ -856,7 +856,7 @@ void QgisMobileapp::readProjectFile()
{
const QFileInfo tmpFi( tmpPath );
if ( SUPPORTED_VECTOR_EXTENSIONS.contains( tmpFi.suffix().toLower() ) || SUPPORTED_RASTER_EXTENSIONS.contains( tmpFi.suffix().toLower() ) )
files << QStringLiteral( "/vsizip/%1/%2" ).arg( mProjectFilePath, tmpPath );
files << QStringLiteral( "/vsi%1/%2/%3" ).arg( suffix, mProjectFilePath, tmpPath );
}
}
CSLDestroy( papszSiblingFiles );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgismobileapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class QgsPrintLayout;
#define REGISTER_SINGLETON( uri, _class, name ) qmlRegisterSingletonType<_class>( uri, 1, 0, name, []( QQmlEngine *engine, QJSEngine *scriptEngine ) -> QObject * { Q_UNUSED(engine); Q_UNUSED(scriptEngine); return new _class(); } )

#define SUPPORTED_PROJECT_EXTENSIONS QStringList( { QStringLiteral( "qgs" ), QStringLiteral( "qgz" ) } )
#define SUPPORTED_VECTOR_EXTENSIONS QStringList( { QStringLiteral( "gpkg" ), QStringLiteral( "shp" ), QStringLiteral( "kml" ), QStringLiteral( "kmz" ), QStringLiteral( "geojson" ), QStringLiteral( "json" ), QStringLiteral( "pdf" ), QStringLiteral( "gpx" ), QStringLiteral( "gml" ), QStringLiteral( "mif" ), QStringLiteral( "fgb" ), QStringLiteral( "db" ), QStringLiteral( "sqlite" ), QStringLiteral( "mbtiles" ), QStringLiteral( "vrt" ), QStringLiteral( "zip" ) } )
#define SUPPORTED_RASTER_EXTENSIONS QStringList( { QStringLiteral( "tif" ), QStringLiteral( "tiff" ), QStringLiteral( "pdf" ), QStringLiteral( "jpg" ), QStringLiteral( "jpeg" ), QStringLiteral( "png" ), QStringLiteral( "gpkg" ), QStringLiteral( "jp2" ), QStringLiteral( "webp" ), QStringLiteral( "mbtiles" ), QStringLiteral( "vrt" ), QStringLiteral( "zip" ) } )
#define SUPPORTED_VECTOR_EXTENSIONS QStringList( { QStringLiteral( "gpkg" ), QStringLiteral( "shp" ), QStringLiteral( "kml" ), QStringLiteral( "kmz" ), QStringLiteral( "geojson" ), QStringLiteral( "json" ), QStringLiteral( "pdf" ), QStringLiteral( "gpx" ), QStringLiteral( "gml" ), QStringLiteral( "mif" ), QStringLiteral( "fgb" ), QStringLiteral( "db" ), QStringLiteral( "sqlite" ), QStringLiteral( "mbtiles" ), QStringLiteral( "vrt" ), QStringLiteral( "zip" ), QStringLiteral( "7z" ), QStringLiteral( "rar" ) } )
#define SUPPORTED_RASTER_EXTENSIONS QStringList( { QStringLiteral( "tif" ), QStringLiteral( "tiff" ), QStringLiteral( "pdf" ), QStringLiteral( "jpg" ), QStringLiteral( "jpeg" ), QStringLiteral( "png" ), QStringLiteral( "gpkg" ), QStringLiteral( "jp2" ), QStringLiteral( "webp" ), QStringLiteral( "mbtiles" ), QStringLiteral( "vrt" ), QStringLiteral( "zip" ), QStringLiteral( "7z" ) } )

/**
* \defgroup core
Expand Down
13 changes: 13 additions & 0 deletions vcpkg/ports/gdal/cmake-project-include.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if(GDAL_USE_KEA)
find_package(Kealib CONFIG REQUIRED)
add_library(KEA::KEA ALIAS Kealib::Kealib)
set(GDAL_CHECK_PACKAGE_KEA_NAMES Kealib CACHE INTERNAL "vcpkg")
set(GDAL_CHECK_PACKAGE_KEA_TARGETS Kealib::Kealib CACHE INTERNAL "vcpkg")
endif()

if(GDAL_USE_WEBP)
find_package(WebP CONFIG REQUIRED)
add_library(WEBP::WebP ALIAS WebP::webp)
set(GDAL_CHECK_PACKAGE_WebP_NAMES WebP CACHE INTERNAL "vcpkg")
set(GDAL_CHECK_PACKAGE_WebP_TARGETS WebP::webp CACHE INTERNAL "vcpkg")
endif()
109 changes: 109 additions & 0 deletions vcpkg/ports/gdal/find-link-libraries.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
diff --git a/cmake/modules/packages/FindFreeXL.cmake b/cmake/modules/packages/FindFreeXL.cmake
index 6c86fb8..0634412 100644
--- a/cmake/modules/packages/FindFreeXL.cmake
+++ b/cmake/modules/packages/FindFreeXL.cmake
@@ -37,7 +37,15 @@ include(SelectLibraryConfigurations)

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_FREEXL QUIET freexl)
+ pkg_check_modules(PC_FREEXL QUIET IMPORTED_TARGET freexl)
+endif()
+if(PC_FREEXL_FOUND)
+ set(FREEXL_INCLUDE_DIR "${PC_FREEXL_INCLUDE_DIRS}" CACHE STRING "")
+ set(FREEXL_LIBRARY "${PC_FREEXL_LIBRARIES}" CACHE STRING "")
+ if(NOT TARGET FREEXL::freexl)
+ add_library(FREEXL::freexl INTERFACE IMPORTED)
+ set_target_properties(FREEXL::freexl PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::PC_FREEXL)
+ endif()
endif()

find_path(FREEXL_INCLUDE_DIR
diff --git a/cmake/modules/packages/FindOpenJPEG.cmake b/cmake/modules/packages/FindOpenJPEG.cmake
index c697484..6e83222 100644
--- a/cmake/modules/packages/FindOpenJPEG.cmake
+++ b/cmake/modules/packages/FindOpenJPEG.cmake
@@ -32,9 +32,18 @@ endfunction()

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_OPENJPEG QUIET libopenjp2)
+ pkg_check_modules(PC_OPENJPEG QUIET IMPORTED_TARGET libopenjp2)
set(OpenJPEG_VERSION_STRING ${PC_OPENJPEG_VERSION})
endif()
+if(PC_OPENJPEG_FOUND)
+ set(OPENJPEG_INCLUDE_DIR "${PC_OPENJPEG_INCLUDE_DIRS}" CACHE STRING "")
+ set(OPENJPEG_LIBRARY "${PC_OPENJPEG_LIBRARIES}" CACHE STRING "")
+ if(NOT TARGET OPENJPEG::OpenJPEG)
+ add_library(OPENJPEG::OpenJPEG INTERFACE IMPORTED)
+ set_target_properties(OPENJPEG::OpenJPEG PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PC_OPENJPEG_INCLUDE_DIRS}")
+ set_target_properties(OPENJPEG::OpenJPEG PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::PC_OPENJPEG)
+ endif()
+endif()


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
--- a/cmake/modules/packages/FindPoppler.cmake
+++ b/cmake/modules/packages/FindPoppler.cmake
@@ -42,11 +42,19 @@ This module defines the following variables:

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_Poppler QUIET poppler)
+ pkg_check_modules(PC_Poppler QUIET IMPORTED_TARGET poppler)
if(PC_Poppler_VERSION)
set(Poppler_VERSION_STRING ${PC_Poppler_VERSION})
endif()
endif()
+if(PC_Poppler_FOUND)
+ find_path(Poppler_INCLUDE_DIR NAMES Object.h PATHS ${PC_Poppler_INCLUDE_DIRS} NO_DEFAULT_PATH)
+ set(Poppler_LIBRARY "${PC_Poppler_LIBRARIES}" CACHE STRING "")
+ if(NOT TARGET Poppler::Poppler)
+ add_library(Poppler::Poppler INTERFACE IMPORTED)
+ set_target_properties(Poppler::Poppler PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::PC_Poppler)
+ endif()
+endif()
find_path(Poppler_INCLUDE_DIR NAMES "poppler-config.h" "cpp/poppler-version.h" "qt5/poppler-qt5.h" "qt4/poppler-qt4.h"
"glib/poppler.h"
HINTS ${PC_Poppler_INCLUDE_DIRS}
@@ -77,6 +85,15 @@ endforeach()
foreach(_comp IN LISTS Poppler_known_components)
list(FIND Poppler_FIND_COMPONENTS "${_comp}" _nextcomp)
if(_nextcomp GREATER -1)
+ pkg_check_modules(PC_Poppler_${_comp} QUIET IMPORTED_TARGET ${Poppler_${_comp}_pkg_config})
+ if(PC_Poppler_${_comp}_FOUND)
+ set(Poppler_${_comp}_INCLUDE_DIR "${PC_Poppler_${_comp}_INCLUDE_DIRS}" CACHE STRING "")
+ set(Poppler_${_comp}_LIBRARY "${PC_Poppler_${_comp}_LIBRARIES}" CACHE STRING "")
+ if(NOT TARGET Poppler::Poppler_${_comp})
+ add_library(Poppler::${_comp} INTERFACE IMPORTED)
+ set_target_properties(Poppler::${_comp} PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::PC_Poppler_${_comp})
+ endif()
+ endif()
find_path(Poppler_${_comp}_INCLUDE_DIR
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
--- a/cmake/modules/packages/FindSPATIALITE.cmake
+++ b/cmake/modules/packages/FindSPATIALITE.cmake
@@ -38,9 +38,17 @@ endif()

find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_SPATIALITE QUIET spatialite)
+ pkg_check_modules(PC_SPATIALITE QUIET IMPORTED_TARGET spatialite)
set(SPATIALITE_VERSION_STRING ${PC_SPATIALITE_VERSION})
endif()
+if(PC_SPATIALITE_FOUND)
+ set(SPATIALITE_INCLUDE_DIR "${PC_SPATIALITE_INCLUDE_DIRS}" CACHE STRING "")
+ set(SPATIALITE_LIBRARY "${PC_SPATIALITE_LIBRARIES}" CACHE STRING "")
+ if(NOT TARGET SPATIALITE::SPATIALITE)
+ add_library(SPATIALITE::SPATIALITE INTERFACE IMPORTED)
+ set_target_properties(SPATIALITE::SPATIALITE PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::PC_SPATIALITE)
+ endif()
+endif()

find_path(SPATIALITE_INCLUDE_DIR
NAMES spatialite.h
15 changes: 15 additions & 0 deletions vcpkg/ports/gdal/fix-gdal-target-interfaces.patch
Original file line number Diff line number Diff line change
@@ -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()
46 changes: 46 additions & 0 deletions vcpkg/ports/gdal/libkml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
diff --git a/cmake/modules/packages/FindLibKML.cmake b/cmake/modules/packages/FindLibKML.cmake
index 9418247..589b83d 100644
--- a/cmake/modules/packages/FindLibKML.cmake
+++ b/cmake/modules/packages/FindLibKML.cmake
@@ -56,6 +56,8 @@ find_library(LIBKML_BASE_LIBRARY
HINTS ${PC_LIBKML_LIBRARY_DIRS} )
mark_as_advanced(LIBKML_BASE_LIBRARY)

+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW)
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
if(LIBKML_FOUND)
set(LIBKML_INCLUDE_DIRS "${LIBKML_INCLUDE_DIR}")
set(LIBKML_LIBRARIES "${LIBKML_BASE_LIBRARY}")
+ find_package(LibKML CONFIG REQUIRED)
if(NOT TARGET LIBKML::LibKML)
- add_library(LIBKML::LibKML UNKNOWN IMPORTED)
+ add_library(LIBKML::LibKML INTERFACE IMPORTED)
set_target_properties(LIBKML::LibKML PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${LIBKML_INCLUDE_DIR}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C++"
- IMPORTED_LOCATION "${LIBKML_BASE_LIBRARY}")
+ INTERFACE_LINK_LIBRARIES kmlbase)
endif()
foreach(_comp IN LISTS libkml_known_components)
if(${_comp} IN_LIST LibKML_FIND_COMPONENTS)
+ string(TOLOWER ${_comp} _name)
list(APPEND LIBKML_LIBRARIES "${LIBKML_${_comp}_LIBRARY}")
if(NOT TARGET LIBKML::${_comp})
- add_library(LIBKML::${_comp} UNKNOWN IMPORTED)
+ add_library(LIBKML::${_comp} INTERFACE IMPORTED)
set_target_properties(LIBKML::${_comp} PROPERTIES
- IMPORTED_LINK_INTERFACE_LANGUAGES "C++"
- IMPORTED_LOCATION "${LIBKML_${_comp}_LIBRARY}")
+ INTERFACE_LINK_LIBRARIES kml${_name})
endif()
endif()
endforeach()
@@ -129,3 +130,4 @@ if(LIBKML_FOUND)
endif()
endforeach()
endif()
+cmake_policy(POP)
173 changes: 173 additions & 0 deletions vcpkg/ports/gdal/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/gdal
REF "v${VERSION}"
SHA512 fccdcf484bdc833dc5f0d6ad1fce9d152fa8b861cf23b634400d8bf7fd97d2c33a6b87050538c5a6c896d4ba870469134521cc44fdad3e071adffbf29329cb9b
HEAD_REF master
PATCHES
find-link-libraries.patch
fix-gdal-target-interfaces.patch
libkml.patch
target-is-valid.patch
)
# `vcpkg clean` stumbles over one subdir
file(REMOVE_RECURSE "${SOURCE_PATH}/autotest")

# Avoid abseil, no matter if vcpkg or system
vcpkg_replace_string("${SOURCE_PATH}/ogr/ogrsf_frmts/flatgeobuf/flatbuffers/base.h" [[__has_include("absl/strings/string_view.h")]] "(0)")

# Cf. cmake/helpers/CheckDependentLibraries.cmake
# The default for all `GDAL_USE_<PKG>` dependencies is `OFF`.
# Here, we explicitly control dependencies provided via vpcpkg.
# "core" is used for a dependency which must be enabled to avoid vendored lib.
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
archive GDAL_USE_ARCHIVE
cfitsio GDAL_USE_CFITSIO
curl GDAL_USE_CURL
expat GDAL_USE_EXPAT
freexl GDAL_USE_FREEXL
geos GDAL_USE_GEOS
core GDAL_USE_GEOTIFF
gif GDAL_USE_GIF
hdf5 GDAL_USE_HDF5
iconv GDAL_USE_ICONV
jpeg GDAL_USE_JPEG
core GDAL_USE_JSONC
kea GDAL_USE_KEA
lerc GDAL_USE_LERC
libkml GDAL_USE_LIBKML
lzma GDAL_USE_LIBLZMA
libxml2 GDAL_USE_LIBXML2
mysql-libmariadb GDAL_USE_MYSQL
netcdf GDAL_USE_NETCDF
odbc GDAL_USE_ODBC
openjpeg GDAL_USE_OPENJPEG
openssl GDAL_USE_OPENSSL
pcre2 GDAL_USE_PCRE2
png GDAL_USE_PNG
poppler GDAL_USE_POPPLER
postgresql GDAL_USE_POSTGRESQL
qhull GDAL_USE_QHULL
#core GDAL_USE_SHAPELIB # https://github.com/OSGeo/gdal/issues/5711, https://github.com/microsoft/vcpkg/issues/16041
core GDAL_USE_SHAPELIB_INTERNAL
libspatialite GDAL_USE_SPATIALITE
sqlite3 GDAL_USE_SQLITE3
core GDAL_USE_TIFF
webp GDAL_USE_WEBP
core GDAL_USE_ZLIB
zstd GDAL_USE_ZSTD
tools BUILD_APPS
INVERTED_FEATURES
libspatialite CMAKE_DISABLE_FIND_PACKAGE_SPATIALITE
)
if(GDAL_USE_ICONV AND VCPKG_TARGET_IS_WINDOWS)
list(APPEND FEATURE_OPTIONS -D_ICONV_SECOND_ARGUMENT_IS_NOT_CONST=ON)
endif()

# 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)
endif()

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
-DBUILD_TESTING=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_CSharp=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Java=ON
-DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON
-DCMAKE_DISABLE_FIND_PACKAGE_SWIG=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Arrow=ON
-DGDAL_USE_INTERNAL_LIBS=OFF
-DGDAL_USE_EXTERNAL_LIBS=OFF
-DGDAL_BUILD_OPTIONAL_DRIVERS=ON
-DOGR_BUILD_OPTIONAL_DRIVERS=ON
-DFIND_PACKAGE2_KEA_ENABLED=OFF
-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}"
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
OPTIONS_DEBUG
-DBUILD_APPS=OFF
MAYBE_UNUSED_VARIABLES
QHULL_LIBRARY
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/gdal)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/gdal/GDALConfig.cmake"
"include(CMakeFindDependencyMacro)"
"include(CMakeFindDependencyMacro)
# gdal needs a pkg-config tool. A host dependency provides pkgconf.
get_filename_component(vcpkg_host_prefix \"\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}\" ABSOLUTE)
list(APPEND CMAKE_PROGRAM_PATH \"\${vcpkg_host_prefix}/tools/pkgconf\")"
)

if (BUILD_APPS)
vcpkg_copy_tools(
TOOL_NAMES
gdal_contour
gdal_create
gdal_footprint
gdal_grid
gdal_rasterize
gdal_translate
gdal_viewshed
gdaladdo
gdalbuildvrt
gdaldem
gdalenhance
gdalinfo
gdallocationinfo
gdalmanage
gdalmdiminfo
gdalmdimtranslate
gdalsrsinfo
gdaltindex
gdaltransform
gdalwarp
gnmanalyse
gnmmanage
nearblack
ogr2ogr
ogrinfo
ogrlineref
ogrtindex
sozip
AUTO_CLEAN
)
endif()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)

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)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/bin"
"${CURRENT_PACKAGES_DIR}/debug/bin"
)
endif()

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/cpl_config.h" "#define GDAL_PREFIX \"${CURRENT_PACKAGES_DIR}\"" "")

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.TXT")
Loading
Loading