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

gdal: migrate to Conan v2 #19298

Merged
merged 113 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
b8f5ff3
gdal: migrate to Conan v2
valgur Jul 26, 2023
b96b4b4
gdal/post_3.5.0: bump deps
valgur Jul 27, 2023
d2ab756
gdal/post_3.5.0: propagate libjpeg dependency option in graph
valgur Jul 27, 2023
c644aa7
gdal/post_3.5.0: migrate to Conan v2, WIP
valgur Jul 27, 2023
616b52b
gdal/post_3.5.0: tidy
valgur Aug 19, 2023
c446348
gdal/post_3.5.0: adapt ConanFindPackage.cmake to make use of deps.set…
valgur Aug 19, 2023
d93848f
gdal/post_3.5.0: drop v3.5.1
valgur Aug 19, 2023
4b27ef1
gdal/post_3.5.0: fix external json-c not being used
valgur Aug 19, 2023
1e570c9
gdal/post_3.5.0: update v3.7.0, replace gdal_target_link_libraries ev…
valgur Aug 19, 2023
d0a7da5
gdal/post_3.5.0: always use zlib
valgur Aug 19, 2023
1e4c3e9
gdal/post_3.5.0: fix OpenEXR, HDF4, Arrow support
valgur Aug 19, 2023
be7e1fa
gdal/post_3.5.0: more deps fixes
valgur Aug 19, 2023
fba2a27
gdal/post_3.5.0: add libarchive support
valgur Aug 19, 2023
0357110
gdal/post_3.5.0: add libjxl support
valgur Aug 19, 2023
5923907
gdal/post_3.5.0: add lerc support
valgur Aug 19, 2023
0924559
gdal/post_3.5.0: add basisu support
valgur Aug 19, 2023
8115470
gdal/post_3.5.0: add LZMA support
valgur Aug 19, 2023
ad7b9e0
gdal/post_3.5.0: add pdfium support
valgur Aug 19, 2023
e966173
gdal/post_3.5.0: add rasterlite2 support
valgur Aug 19, 2023
c77c183
gdal/post_3.5.0: add missing GDAL_USE_*_INTERNAL vars
valgur Aug 20, 2023
674de8f
gdal/post_3.5.0: did not mean to enable rasterlite2 by default
valgur Aug 20, 2023
a44f68c
gdal/post_3.5.0: fix rasterlite2 issue
valgur Aug 20, 2023
c9c954c
gdal/post_3.5.0: add spatialite support
valgur Aug 20, 2023
647c444
gdal/post_3.5.0: add external shapelib support
valgur Aug 20, 2023
8b71453
gdal/post_3.5.0: fix typo
valgur Aug 20, 2023
6691538
gdal/post_3.5.0: make libtiff a required dependency
valgur Aug 20, 2023
2d919b9
gdal/post_3.5.0: make internal-only deps configurable, don't use exte…
valgur Aug 20, 2023
d7feef1
gdal/post_3.5.0: ignore deprecated options in package_id
valgur Aug 20, 2023
6829c2d
gdal/post_3.5.0: bump deps
valgur Aug 20, 2023
a76be9f
gdal/post_3.5.0: merge and sort external/internal cmake settings
valgur Aug 20, 2023
a6c22cc
gdal/post_3.5.0: set GDAL_SET_INSTALL_RELATIVE_RPATH=True
valgur Aug 20, 2023
944bcff
gdal/post_3.5.0: add with_publicdecompwt option
valgur Aug 20, 2023
f143125
gdal/post_3.5.0: set all recommended and required options to True
valgur Aug 20, 2023
6f552f3
gdal/post_3.5.0: proj is not really an optional dependency
valgur Aug 20, 2023
55fde09
gdal/post_3.5.0: separate commercial libs in pkg list
valgur Aug 20, 2023
d060c6c
gdal/post_3.5.0: add v3.7.1, simplify patches
valgur Aug 20, 2023
8b0834d
gdal/post_3.5.0: downgrade libpq
valgur Aug 20, 2023
0f9a200
gdal/post_3.5.0: configure all available GDAL_USE_* variables
valgur Aug 21, 2023
9b8e5b6
gdal/post_3.5.0: prevent any accidental use of system libs
valgur Aug 21, 2023
fd04183
gdal/post_3.5.0: add QUIET to find_package2()
valgur Aug 21, 2023
919cd33
gdal/post_3.5.0: fix libjpeg-turbo support
valgur Aug 21, 2023
1a9469e
gdal/post_3.5.0: fix jxl_threads support
valgur Aug 21, 2023
8f232a5
gdal: bump deps
valgur Sep 7, 2023
4e39893
gdal: fix shared builds
valgur Sep 7, 2023
040aa82
gdal: use version ranges for libcurl and zlib
valgur Sep 7, 2023
367641c
gdal: fix v5.3.2 patch
valgur Sep 11, 2023
f6fa4de
gdal: fix includes not being propagated correctly
valgur Sep 11, 2023
8bebf40
gdal: Conan v1 issue
valgur Sep 11, 2023
035e237
gdal: fix linter warnings
valgur Sep 11, 2023
f279eab
gdal: fix patch issue
valgur Sep 12, 2023
3de211f
gdal: bump to 3.7.2
valgur Sep 18, 2023
cb5dd24
gdal/post_3.5.0: bump deps
valgur Nov 1, 2023
c2042c2
gdal/post_3.5.0: add missing system libs
valgur Nov 2, 2023
343b691
gdal: add v3.8.0, v3.7.3, v3.5.3, drop old versions
valgur Nov 18, 2023
100e3fd
gdal: bump deps
valgur Nov 18, 2023
7540a25
gdal: disable pdfium
valgur Nov 18, 2023
4767bd3
gdal: update config.yml
valgur Nov 18, 2023
b4b10a4
gdal: fix failing compilation checks on MSVC
valgur Nov 18, 2023
1b6b421
gdal: downgrade sqlite3 for proj
valgur Nov 18, 2023
6649b67
gdal: fix hdf5 check
valgur Nov 18, 2023
69a6d25
gdal: add brunsli support
valgur Nov 19, 2023
1b12584
gdal: add opencl support
valgur Nov 19, 2023
2ac650b
gdal: add tiledb
valgur Nov 19, 2023
ce6da4b
gdal: add ecw support
valgur Nov 19, 2023
5ff6318
gdal: bump sqlite3 dependency
valgur Nov 20, 2023
03e0391
gdal: fix brunsli option
valgur Nov 20, 2023
578a4e2
Merge branch 'master' into migrate/gdal
valgur Nov 21, 2023
1b3689b
gdal: fix gdal data not being packaged
valgur Nov 22, 2023
0346e82
Merge branch 'master' into migrate/gdal
valgur Nov 22, 2023
d445da2
Merge branch 'master' into migrate/gdal
valgur Nov 27, 2023
225e363
Merge branch 'master' into migrate/gdal
valgur Nov 29, 2023
334706c
gdal: bump deps
valgur Nov 29, 2023
eacd977
gdal: bump to v3.8.1
valgur Dec 1, 2023
f8fc064
gdal: improve patching
valgur Dec 5, 2023
ea1e8c7
gdal: disable libiconv on macOS
valgur Dec 15, 2023
4c3b933
gdal: drop ineffective libjpeg-turbo propagation
valgur Dec 15, 2023
5d4e0ab
Merge remote-tracking branch 'upstream/master' into migrate/gdal
valgur Dec 15, 2023
4d7ac57
gdal: bump deps
valgur Dec 15, 2023
b50986f
gdal: add parquet support
valgur Dec 15, 2023
91020b7
gdal: avoid the use of cache_variables
valgur Dec 15, 2023
88f00d4
gdal: configure ArrowDataset correctly
valgur Dec 15, 2023
25a804e
Merge branch 'master' into migrate/gdal
valgur Dec 19, 2023
b85abd0
gdal: fix ArrowDataset support by version
valgur Dec 19, 2023
b572d43
gdal: fix arrow target name on 3.5
valgur Dec 19, 2023
6e4cda4
gdal: disable arrow for v3.5
valgur Dec 19, 2023
1f0057d
gdal: bump to v3.8.2
valgur Dec 20, 2023
1fbd9af
gdal: bump arrow
valgur Dec 20, 2023
4c38925
gdal: further mark proprietary deps as such
valgur Dec 20, 2023
3a1d2c6
gdal: add libaec support
valgur Dec 20, 2023
0d1c374
gdal: bump proj
valgur Jan 1, 2024
2207075
gdal: add a workaround for iconv() incompatibilities
valgur Jan 2, 2024
37e113d
gdal: fix v3.5.3 URL and related patch
valgur Jan 4, 2024
2a2e392
gdal: re-enable libiconv for apple-clang
valgur Jan 4, 2024
85454b7
gdal: add short comments for deprecated options
valgur Jan 4, 2024
f5e7e9c
gdal: libiconv patches can be avoided
valgur Jan 4, 2024
d48d3e0
gdal: revert 3.5.3 to v3.5.2 due to patching issues
valgur Jan 4, 2024
c66c850
gdal: split two unrelated patches
valgur Jan 4, 2024
033ef9d
gdal: fix mistake in patch splitting
valgur Jan 4, 2024
4c73923
gdal: prevent the use of system libs better
valgur Jan 5, 2024
9b87b5b
gdal: simplify 2-allow-cycles-in-cmake-targets.patch
valgur Jan 5, 2024
a016fb7
gdal: bump v3.5.2 -> v3.5.3
valgur Jan 5, 2024
f26c947
gdal: drop unused import
valgur Jan 5, 2024
450afd7
gdal: bump 3.8.2 -> 3.8.3
valgur Jan 9, 2024
f6cc758
gdal: bump deps
valgur Jan 9, 2024
1d52317
gdal: enable Armadillo
valgur Jan 16, 2024
03c013f
Merge remote-tracking branch 'upstream/master' into migrate/gdal
valgur Jan 16, 2024
1ee20b2
gdal: bump deps
valgur Jan 16, 2024
876a7cc
gdal: fix a v3.5.3 CMake bug
valgur Jan 16, 2024
8a294e3
Merge branch 'master' into migrate/gdal
AbrilRBS Jan 25, 2024
c01267d
gdal: add CMAKE_TRY_COMPILE_CONFIGURATION for try_compile()
valgur Jan 25, 2024
be97efd
Add deprecation warning message
uilianries Feb 12, 2024
d47f985
Do not set json-c include folder
uilianries Feb 12, 2024
0ee0384
fix missing if condition
uilianries Feb 12, 2024
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 recipes/gdal/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
versions:
"3.7.0":
"3.8.3":
folder: "post_3.5.0"
"3.5.2":
"3.7.3":
folder: "post_3.5.0"
"3.5.1":
"3.5.3":
folder: "post_3.5.0"
"3.4.3":
folder: "pre_3.5.0"
Expand Down
105 changes: 2 additions & 103 deletions recipes/gdal/post_3.5.0/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(gdal_cmake_wrapper)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

include(CMakePushCheckState)


if (${GDAL_USE_POPPLER})
find_package(poppler)
set(Poppler_VERSION_STRING ${poppler_VERSION})
add_library(Poppler::Poppler ALIAS poppler::libpoppler)
endif()

file(GLOB CONAN_GENERATED_CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Find*.cmake")
foreach(CMAKE_FILE ${CONAN_GENERATED_CMAKE_FILES})
include(${CMAKE_FILE})
endforeach()

if (${GDAL_USE_ARROW})
find_package(Arrow REQUIRED)
add_library(arrow_shared ALIAS arrow::arrow)
endif()

if (${GDAL_USE_CRYPTOPP})
find_package(cryptopp REQUIRED)
add_library(CRYPTOPP::CRYPTOPP ALIAS ${TARGET_FOR_CRYPTOPP})
endif()

if (${GDAL_USE_DEFLATE})
find_package(libdeflate REQUIRED)
add_library(Deflate::Deflate ALIAS ${TARGET_FOR_DEFLATE})
endif()

if (${GDAL_USE_LZ4})
find_package(lz4 REQUIRED)
add_library(LZ4::LZ4 ALIAS lz4::lz4)
endif()

if (${GDAL_USE_BLOSC})
find_package(c-blosc REQUIRED)
add_library(Blosc::Blosc ALIAS c-blosc::c-blosc)
endif()

if (${GDAL_USE_OPENEXR})
if (GDAL_USE_OPENEXR)
find_package(Imath REQUIRED)
find_package(OpenEXR REQUIRED)
add_library(OpenEXR::IlmImf ALIAS OpenEXR::IlmThread)
Expand All @@ -56,62 +13,4 @@ if (${GDAL_USE_OPENEXR})
target_include_directories(OpenEXR::OpenEXR INTERFACE ${OpenEXR_INCLUDE_DIR})
endif()

if (${GDAL_USE_FREEXL})
find_package(freexl REQUIRED)
add_library(FREEXL::freexl ALIAS freexl::freexl)
endif()

if (${GDAL_USE_OPENJPEG})
add_library(OPENJPEG::OpenJPEG ALIAS OpenJPEG::OpenJPEG)
endif()

if (${GDAL_USE_GIF})
find_package(GIF REQUIRED)
endif()

if (${GDAL_USE_CFITSIO})
find_package(cfitsio)
add_library(CFITSIO::CFITSIO ALIAS cfitsio::cfitsio)
endif()

if (${GDAL_USE_SQLITE3})
find_package(SQLite3)
endif()

if (${GDAL_USE_LIBXML2})
find_package(LibXml2)
endif()

if (${GDAL_USE_POSTGRESQL})
find_package(PostgreSQL)
add_library(PostgreSQL::PostgreSQL ALIAS PostgreSQL::pq)
endif()

if (${GDAL_USE_HDF5})
find_package(HDF5)
set(HDF5_C_LIBRARIES HDF5::C)
endif()

if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "libmysqlclient")
find_package(mysql REQUIRED)
endif()
if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "mariadb-connector-c")
find_package(mariadb-connector-c REQUIRED)
endif()

if (${GDAL_USE_ZLIB})
find_package(ZLIB)
endif()

if ("${GDAL_CONAN_PACKAGE_FOR_JPEG}" STREQUAL "libjpeg-turbo")
find_package(libjpeg-turbo REQUIRED)
add_library(JPEG::JPEG ALIAS ${TARGET_FOR_JPEG})
endif()

if (${GDAL_USE_PCRE2})
find_package(PCRE2 REQUIRED)
add_library(PCRE2::PCRE2-8 ALIAS PCRE2::8BIT)
endif()


add_subdirectory("source_subfolder")
add_subdirectory(src)
48 changes: 48 additions & 0 deletions recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
function(define_find_package2 pkgname include_file library_name)
endfunction()
function(find_package2 pkgname)
# Remove args unsupported by find_package()
list(REMOVE_ITEM ARGN OUT_DEPENDENCY _find_dependency)
# Force CONFIG mode
list(REMOVE_ITEM ARGN MODULE NO_CONFIG NO_MODULE)
string(TOUPPER ${pkgname} key)
if(DEFINED GDAL_USE_${key} AND NOT GDAL_USE_${key})
set(${pkgname}_FOUND)
set(${key}_FOUND)
return()
endif()
find_package(${pkgname} ${ARGN}
QUIET
CONFIG
GLOBAL
# Forbid the use of system libs entirely
NO_DEFAULT_PATH
PATHS ${CMAKE_PREFIX_PATH}
)
# Add variables with upper-case package name in addition to the default ones
set(targets "")
foreach(lib ${${pkgname}_LIBRARIES})
if(TARGET ${lib})
list(APPEND targets ${lib})
endif()
endforeach()
# Add upper-case variables
set(${key}_DEFINITIONS "${${pkgname}_DEFINITIONS}" CACHE STRING "")
set(${key}_FOUND ${${pkgname}_FOUND} CACHE BOOL "")
set(${key}_INCLUDE_DIR "${${pkgname}_INCLUDE_DIR}" CACHE STRING "")
set(${key}_INCLUDE_DIRS "${${pkgname}_INCLUDE_DIRS}" CACHE STRING "")
set(${key}_LIBRARIES "${${pkgname}_LIBRARIES}" CACHE STRING "")
set(${key}_LIBRARY "${${pkgname}_LIBRARIES}" CACHE STRING "")
set(${key}_TARGET "${targets}" CACHE STRING "")
set(${key}_VERSION ${${pkgname}_VERSION} CACHE BOOL "")

# Add as cache vars for global visibility
set(${pkgname}_FOUND ${${pkgname}_FOUND} CACHE BOOL "")
set(${pkgname}_TARGET "${targets}" CACHE STRING "")
set(${pkgname}_VERSION ${${pkgname}_VERSION_STRING} CACHE BOOL "")

message(STATUS "Found ${pkgname}: ${${pkgname}_FOUND}")
message(STATUS " ${key}_TARGET: ${${key}_TARGET}")
message(STATUS " ${key}_LIBRARIES: ${${key}_LIBRARIES}")
message(STATUS " ${key}_INCLUDE_DIRS: ${${key}_INCLUDE_DIRS}")
endfunction()
57 changes: 39 additions & 18 deletions recipes/gdal/post_3.5.0/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
sources:
"3.7.0":
url: "https://github.com/OSGeo/gdal/releases/download/v3.7.0/gdal-3.7.0.tar.gz"
sha256: "5a806d759f403a15bbbf8a14ecc6947071afc5ab91e5abaef0d11d1d2d16bf94"
"3.5.2":
url: "https://github.com/OSGeo/gdal/releases/download/v3.5.2/gdal-3.5.2.tar.gz"
sha256: "fbd696e1b2a858fbd2eb3718db16b14ed9ba82521d3578770d480c74fe1146d2"
"3.5.1":
url: "https://github.com/OSGeo/gdal/releases/download/v3.5.1/gdal-3.5.1.tar.gz"
sha256: "7c4406ca010dc8632703a0a326f39e9db25d9f1f6ebaaeca64a963e3fac123d1"
"3.8.3":
url: "https://github.com/OSGeo/gdal/releases/download/v3.8.3/gdal-3.8.3.tar.gz"
sha256: "f7a30387a8239e9da26200f787a02136df2ee6473e86b36d05ad682761a049ea"
"3.7.3":
url: "https://github.com/OSGeo/gdal/releases/download/v3.7.3/gdal-3.7.3.tar.gz"
sha256: "f66161e10b8b89a8a541cd760cd36d490114ed3f020a26db1489a6154db5d2be"
"3.5.3":
url: "https://github.com/OSGeo/gdal/releases/download/v3.5.3/gdal-3.5.3.tar.gz"
sha256: "a9ea0300d17e35bab71df4f16e62bb2fb8081caf994ab3ee0502ce4cf0d4e593"
patches:
"3.7.0":
- patch_file: "patches/3.7.0/0-replace-find-package.patch"
base_path: "source_subfolder"
"3.5.2":
- patch_file: "patches/3.5.2/0-replace-find-package.patch"
base_path: "source_subfolder"
"3.5.1":
- patch_file: "patches/3.5.1/0-replace-find-package.patch"
base_path: "source_subfolder"
"3.8.3":
- patch_file: "patches/3.8.1/0-replace-find-package.patch"
patch_description: "Use custom version of find_package() for Conan deps"
patch_type: "conan"
- patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch"
patch_description: "Fix private linking not working for some Conan dependencies"
patch_type: "conan"
- patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch"
patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets"
patch_type: "conan"
"3.7.3":
- patch_file: "patches/3.7.3/0-replace-find-package.patch"
patch_description: "Use custom version of find_package() for Conan deps"
patch_type: "conan"
- patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch"
patch_description: "Fix private linking not working for some Conan dependencies"
patch_type: "conan"
- patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch"
patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets"
patch_type: "conan"
"3.5.3":
- patch_file: "patches/3.5.3/0-replace-find-package.patch"
patch_description: "Use custom version of find_package() for Conan deps"
patch_type: "conan"
- patch_file: "patches/3.5.3/1-do-not-force-private-linking.patch"
patch_description: "Fix private linking not working for some Conan dependencies"
patch_type: "conan"
- patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch"
patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets"
patch_type: "conan"
Loading
Loading