11diff --git a/alg/CMakeLists.txt b/alg/CMakeLists.txt
2- index 2e6810f95b..b5601e4bac 100644
2+ index fe008aa606..8b3d3bf159 100644
33--- a/alg/CMakeLists.txt
44+++ b/alg/CMakeLists.txt
5- @@ -50 ,7 +50 ,7 @@ target_compile_options(alg PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${GDAL_CXX_WARNING_
5+ @@ -51 ,7 +51 ,7 @@ target_compile_options(alg PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${GDAL_CXX_WARNING_
66 target_compile_options(alg PRIVATE $<$<COMPILE_LANGUAGE:C>:${GDAL_C_WARNING_FLAGS}>)
77
88 target_include_directories(
@@ -12,14 +12,14 @@ index 2e6810f95b..b5601e4bac 100644
1212 set_property(TARGET alg PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE})
1313 target_sources(${GDAL_LIB_TARGET_NAME} PRIVATE $<TARGET_OBJECTS:alg>)
1414diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake
15- index f5c920af9d..821e4caa26 100644
15+ index 6f9ee274bf..af103ffec7 100644
1616--- a/cmake/helpers/CheckDependentLibraries.cmake
1717+++ b/cmake/helpers/CheckDependentLibraries.cmake
18- @@ -379 ,14 +379 ,6 @@ else( )
19- string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency( PROJ 6.0)\n ")
20- endif ()
18+ @@ -409 ,14 +409 ,6 @@ if ("${PROJ_VERSION}" VERSION_LESS "6.3" )
19+ message(FATAL_ERROR " PROJ >= 6.3 required. Version ${PROJ_VERSION} found ")
20+ endif()
2121
22- - gdal_check_package(TIFF "Support for the Tag Image File Format (TIFF)." VERSION 4.0 CAN_DISABLE)
22+ - gdal_check_package(TIFF "Support for the Tag Image File Format (TIFF)." VERSION 4.1 CAN_DISABLE)
2323- set_package_properties(
2424- TIFF PROPERTIES
2525- URL "https://libtiff.gitlab.io/libtiff/"
@@ -30,7 +30,7 @@ index f5c920af9d..821e4caa26 100644
3030 if (DEFINED ENV{CONDA_PREFIX} AND UNIX)
3131 # Currently on Unix, the Zstd cmake config file is buggy. It declares a
3232 # libzstd_static target but the corresponding libzstd.a file is missing,
33- @@ -400,12 +392 ,6 @@ gdal_check_package(ZSTD "ZSTD compression library" CAN_DISABLE ${ZSTD_NAMES_AND_
33+ @@ -430,11 +422 ,6 @@ gdal_check_package(ZSTD "ZSTD compression library" CAN_DISABLE ${ZSTD_NAMES_AND_
3434 gdal_check_package(SFCGAL "gdal core supports ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D operations"
3535 CAN_DISABLE)
3636
@@ -39,15 +39,14 @@ index f5c920af9d..821e4caa26 100644
3939- TARGETS geotiff_library GEOTIFF::GEOTIFF
4040- )
4141- gdal_internal_library(GEOTIFF REQUIRED)
42- -
43- gdal_check_package(PNG "PNG compression library (external)" CAN_DISABLE RECOMMENDED)
44- gdal_internal_library(PNG)
4542
43+ gdal_check_package(PNG "PNG compression library (external)" CAN_DISABLE RECOMMENDED VERSION "1.6")
44+ gdal_internal_library(PNG)
4645diff --git a/frmts/CMakeLists.txt b/frmts/CMakeLists.txt
47- index 01265cdd8a..90c6b65b49 100644
46+ index fc9787f958..87df879313 100644
4847--- a/frmts/CMakeLists.txt
4948+++ b/frmts/CMakeLists.txt
50- @@ -8 ,10 +8 ,7 @@ include(CMakeDependentOption)
49+ @@ -34 ,10 +34 ,7 @@ include(CMakeDependentOption)
5150 gdal_dependent_format(jpeg "JPEG image format" "GDAL_USE_JPEG OR GDAL_USE_JPEG_INTERNAL")
5251
5352 # base driver provide frmt core functions
@@ -58,7 +57,7 @@ index 01265cdd8a..90c6b65b49 100644
5857 gdal_format(mem "Read/write data in Memory")
5958 gdal_format(vrt "Virtual GDAL Datasets")
6059 # Note: derived is derived of vrt
61- @@ -23,126 +20 ,10 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug" OR GDAL_ENABLE_DRIVER_NULL)
60+ @@ -49,125 +46 ,10 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug" OR GDAL_ENABLE_DRIVER_NULL)
6261 gdal_optional_format(null "NULL dummy driver")
6362 endif ()
6463
@@ -125,7 +124,6 @@ index 01265cdd8a..90c6b65b49 100644
125124- # optional Formats
126125- gdal_optional_format(bsb "Maptech/NOAA BSB Nautical Chart Format")
127126- gdal_dependent_format(aigrid "Arc/Info Binary Grid Format" "OGR_ENABLE_DRIVER_AVC")
128- - gdal_optional_format(arg "ARG: Azavea Raster Grid")
129127- gdal_optional_format(usgsdem "USGS ASCII DEM (and CDED)")
130128- gdal_optional_format(airsar "AirSAR Polarimetric Format")
131129- gdal_optional_format(ozi "OZF2/OZFX3 raster")
@@ -186,10 +184,10 @@ index 01265cdd8a..90c6b65b49 100644
186184 # Register all frmt drivers according to FRMT_<driver> flags
187185 gdal_standard_includes(gdal_frmts)
188186diff --git a/gcore/CMakeLists.txt b/gcore/CMakeLists.txt
189- index 5de011eb63..4b76fc686f 100644
187+ index f8258bbdec..4981effb38 100644
190188--- a/gcore/CMakeLists.txt
191189+++ b/gcore/CMakeLists.txt
192- @@ -58 ,7 +58 ,7 @@ target_compile_options(gcore PRIVATE ${GDAL_CXX_WARNING_FLAGS} ${WFLAG_OLD_STYLE
190+ @@ -68 ,7 +68 ,7 @@ target_compile_options(gcore PRIVATE ${GDAL_CXX_WARNING_FLAGS} ${WFLAG_OLD_STYLE
193191 target_include_directories(
194192 gcore
195193 PRIVATE $<TARGET_PROPERTY:ogrsf_generic,SOURCE_DIR> $<TARGET_PROPERTY:ogr_geojson,SOURCE_DIR>
@@ -199,7 +197,7 @@ index 5de011eb63..4b76fc686f 100644
199197 set_property(TARGET gcore PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE})
200198
201199diff --git a/gcore/gdaljp2metadata.cpp b/gcore/gdaljp2metadata.cpp
202- index 9d2751e676..1a3b9475d0 100644
200+ index 139c6940c2..b50c537b41 100644
203201--- a/gcore/gdaljp2metadata.cpp
204202+++ b/gcore/gdaljp2metadata.cpp
205203@@ -52,7 +52,6 @@
@@ -337,7 +335,7 @@ index 9d2751e676..1a3b9475d0 100644
337335 /************************************************************************/
338336 /* ParseMSIG() */
339337 /************************************************************************/
340- @@ -1218,40 +1097,6 @@ void GDALJP2Metadata::SetRPCMD(char **papszRPCMDIn)
338+ @@ -1218,65 +1097,6 @@ void GDALJP2Metadata::SetRPCMD(char **papszRPCMDIn)
341339 papszRPCMD = CSLDuplicate(papszRPCMDIn);
342340 }
343341
@@ -374,15 +372,40 @@ index 9d2751e676..1a3b9475d0 100644
374372-
375373- return poBox;
376374- }
375+ -
376+ - /************************************************************************/
377+ - /* IsSRSCompatible() */
378+ - /************************************************************************/
379+ -
380+ - /* Returns true if the SRS can be references through a EPSG code, or encoded
381+ - * as a GML SRS
382+ - */
383+ - bool GDALJP2Metadata::IsSRSCompatible(const OGRSpatialReference *poSRS)
384+ - {
385+ - const char *pszAuthName = poSRS->GetAuthorityName(nullptr);
386+ - const char *pszAuthCode = poSRS->GetAuthorityCode(nullptr);
387+ -
388+ - if (pszAuthName && pszAuthCode && EQUAL(pszAuthName, "epsg"))
389+ - {
390+ - if (atoi(pszAuthCode))
391+ - return true;
392+ - }
393+ -
394+ - CPLErrorStateBackuper oErrorStateBackuper(CPLQuietErrorHandler);
395+ - char *pszGMLDef = nullptr;
396+ - const bool bRet = (poSRS->exportToXML(&pszGMLDef, nullptr) == OGRERR_NONE);
397+ - CPLFree(pszGMLDef);
398+ - return bRet;
399+ - }
377400-
378401 /************************************************************************/
379402 /* GetGMLJP2GeoreferencingInfo() */
380403 /************************************************************************/
381404diff --git a/gdal.cmake b/gdal.cmake
382- index 7921873d3d..3a8e859548 100644
405+ index 54cfbe13af..c7ca3338a4 100644
383406--- a/gdal.cmake
384407+++ b/gdal.cmake
385- @@ -555 ,8 +555 ,6 @@ if(OGR_ENABLE_DRIVER_GPKG AND
408+ @@ -548 ,8 +548 ,6 @@ if(OGR_ENABLE_DRIVER_GPKG AND
386409 endif()
387410
388411 # We need to forward declare a few OGR drivers because raster formats need them
@@ -392,10 +415,10 @@ index 7921873d3d..3a8e859548 100644
392415 "GDAL_USE_SQLITE3" OFF)
393416 cmake_dependent_option(OGR_ENABLE_DRIVER_GPKG "Set ON to build OGR GPKG driver" ${OGR_BUILD_OPTIONAL_DRIVERS}
394417diff --git a/ogr/ogrsf_frmts/CMakeLists.txt b/ogr/ogrsf_frmts/CMakeLists.txt
395- index ec61b85a15 ..7819c19ae6 100644
418+ index f11285935d ..7819c19ae6 100644
396419--- a/ogr/ogrsf_frmts/CMakeLists.txt
397420+++ b/ogr/ogrsf_frmts/CMakeLists.txt
398- @@ -13,102 +13,11 @@ add_dependencies(ogrsf_frmts generate_gdal_version_h)
421+ @@ -13,105 +13,11 @@ add_dependencies(ogrsf_frmts generate_gdal_version_h)
399422 # Obligatory for building GDAL; always compile in.
400423 ogr_default_driver(mem "Read/write driver for MEMORY virtual files")
401424 ogr_default_driver(geojson "GeoJSON/ESRIJSON/TopoJSON driver")
@@ -433,6 +456,9 @@ index ec61b85a15..7819c19ae6 100644
433456- ogr_optional_driver(flatgeobuf FlatGeobuf)
434457- ogr_optional_driver(mapml MapML)
435458- ogr_optional_driver(jsonfg JSONFG)
459+ - if( NOT WORDS_BIGENDIAN )
460+ - ogr_optional_driver(miramon "MiraMonVector")
461+ - endif()
436462-
437463- # ######################################################################################################################
438464- #
0 commit comments