[gdcm] Update to 3.0.24, cleanup (#41552)

This commit is contained in:
Kai Pastor 2024-10-16 05:15:51 +02:00 committed by GitHub
parent 86cbf9a7ca
commit aeddf73af2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 224 additions and 180 deletions

View File

@ -1,41 +0,0 @@
diff --git a/CMake/ExportConfiguration/GDCMConfig.cmake.in b/CMake/ExportConfiguration/GDCMConfig.cmake.in
index f8e9d0b..ab28546 100644
--- a/CMake/ExportConfiguration/GDCMConfig.cmake.in
+++ b/CMake/ExportConfiguration/GDCMConfig.cmake.in
@@ -33,28 +33,28 @@ if(GDCM_USE_VTK)
set(GDCM_VTK_DIR "@GDCM_VTK_DIR_CONFIG@")
endif()
-get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-if(EXISTS ${SELF_DIR}/GDCMTargets.cmake)
+get_filename_component(GDCM_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+if(EXISTS ${GDCM_SELF_DIR}/GDCMTargets.cmake)
# This is an install tree
- include(${SELF_DIR}/GDCMTargets.cmake)
- get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE)
+ include(${GDCM_SELF_DIR}/GDCMTargets.cmake)
+ get_filename_component(GDCM_INCLUDE_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE)
set(GDCM_INCLUDE_DIRS ${GDCM_INCLUDE_ROOT})
- get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE)
+ get_filename_component(GDCM_LIB_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE)
set(GDCM_LIBRARY_DIRS ${GDCM_LIB_ROOT})
else()
- if(EXISTS ${SELF_DIR}/GDCMExports.cmake)
+ if(EXISTS ${GDCM_SELF_DIR}/GDCMExports.cmake)
# This is a build tree
set( GDCM_INCLUDE_DIRS "@GDCM_INCLUDE_PATH@")
set(GDCM_LIBRARY_DIRS "@GDCM_LIBRARY_DIR@")
- include(${SELF_DIR}/GDCMExports.cmake)
+ include(${GDCM_SELF_DIR}/GDCMExports.cmake)
else()
message(FATAL_ERROR "ooops")
endif()
endif()
-set(GDCM_USE_FILE ${SELF_DIR}/UseGDCM.cmake)
+set(GDCM_USE_FILE ${GDCM_SELF_DIR}/UseGDCM.cmake)
# Backward compatible part:
set(GDCM_FOUND TRUE)

87
ports/gdcm/copyright.diff Normal file
View File

@ -0,0 +1,87 @@
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 4cdc999..5971705 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -12,8 +12,8 @@ if(NOT GDCM_USE_SYSTEM_LJPEG)
endif()
# Do expat
-APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmexpat/COPYING)
if(NOT GDCM_USE_SYSTEM_EXPAT)
+APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmexpat/COPYING)
set(EXPAT_NAMESPACE "GDCMEXPAT")
set(EXPAT_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
set(EXPAT_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
@@ -22,8 +22,8 @@ if(NOT GDCM_USE_SYSTEM_EXPAT)
endif()
# Do openjpeg (jpeg2000 implementation)
-APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmopenjpeg/LICENSE)
if(NOT GDCM_USE_SYSTEM_OPENJPEG)
+APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmopenjpeg/LICENSE)
set(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
set(OPENJPEG_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
set(OPENJPEG_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
@@ -34,9 +34,9 @@ if(NOT GDCM_USE_SYSTEM_OPENJPEG)
endif()
# Do jpegls (JPEG-LS aka near lossless implementation)
-APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmcharls/License.txt)
if(GDCM_USE_JPEGLS)
if(NOT GDCM_USE_SYSTEM_CHARLS)
+APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmcharls/License.txt)
set(CHARLS_NAMESPACE "GDCMCHARLS")
set(CHARLS_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
set(CHARLS_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
@@ -47,9 +47,9 @@ endif()
endif()
# Do md5
-APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmmd5/COPYING)
if(GDCM_BUILD_TESTING)
if(NOT GDCM_USE_SYSTEM_MD5)
+APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmmd5/COPYING)
set(MD5_NAMESPACE "GDCMMD5")
set(MD5_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
set(MD5_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
@@ -59,8 +59,8 @@ endif()
endif()
# Do zlib
-APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmzlib/COPYING)
if(NOT GDCM_USE_SYSTEM_ZLIB)
+APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmzlib/COPYING)
set(ZLIB_NAMESPACE "GDCMZLIB")
set(ZLIB_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
set(ZLIB_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
@@ -70,8 +70,8 @@ endif()
# Do getopt
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/getopt)
- APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/getopt/COPYING)
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
+ APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/getopt/COPYING)
set(GETOPT_NAMESPACE "GDCMGETOPT")
set(GETOPT_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
set(GETOPT_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
@@ -81,9 +81,9 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/getopt)
endif()
# you could be running mingw32 on linux in which case you do NOT want the gdcmuuid lib
-APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmuuid/COPYING)
if(NOT WIN32 AND NOT MINGW)
if(NOT GDCM_USE_SYSTEM_UUID)
+APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmuuid/COPYING)
set(UUID_NAMESPACE "GDCMUUID")
set(UUID_INSTALL_NO_LIBRARIES ${GDCM_INSTALL_NO_LIBRARIES})
set(UUID_INSTALL_BIN_DIR ${GDCM_INSTALL_BIN_DIR})
@@ -92,8 +92,8 @@ if(NOT WIN32 AND NOT MINGW)
endif()
endif()
-APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/pvrg/COPYING)
if(GDCM_USE_PVRG)
+APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/pvrg/COPYING)
if(NOT GDCM_USE_SYSTEM_PVRG)
add_subdirectory(pvrg)
endif()

View File

@ -1,38 +0,0 @@
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt
index 4cdc999..c6ede41 100644
--- a/Utilities/CMakeLists.txt
+++ b/Utilities/CMakeLists.txt
@@ -69,6 +69,7 @@ if(NOT GDCM_USE_SYSTEM_ZLIB)
endif()
# Do getopt
+if(NOT USE_VCPKG_GETOPT)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/getopt)
APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/getopt/COPYING)
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
@@ -79,6 +80,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/getopt)
add_subdirectory(getopt)
endif()
endif()
+endif()
# you could be running mingw32 on linux in which case you do NOT want the gdcmuuid lib
APPEND_COPYRIGHT(${CMAKE_CURRENT_SOURCE_DIR}/gdcmuuid/COPYING)
diff --git a/Utilities/VTK/Applications/CMakeLists.txt b/Utilities/VTK/Applications/CMakeLists.txt
index a7f7e7e..ab89a73 100644
--- a/Utilities/VTK/Applications/CMakeLists.txt
+++ b/Utilities/VTK/Applications/CMakeLists.txt
@@ -60,7 +60,12 @@ foreach(app ${GDCM_VTK_APPS})
endif()
endif()
if(WIN32 AND NOT CYGWIN)
- target_link_libraries(${app} gdcmgetopt)
+ if(USE_VCPKG_GETOPT)
+ find_package(unofficial-getopt-win32 REQUIRED)
+ target_link_libraries(${app} PRIVATE unofficial::getopt-win32::getopt)
+ else()
+ target_link_libraries(${app} gdcmgetopt)
+ endif()
endif()
if(NOT GDCM_INSTALL_NO_RUNTIME)
install(TARGETS ${app}

View File

@ -1,32 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6ac16ab..842d833 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -246,15 +246,15 @@ if(NOT GDCM_INSTALL_LIB_DIR)
endif()
if(NOT GDCM_INSTALL_DATA_DIR)
- set(GDCM_INSTALL_DATA_DIR "share/${subdir}")
+ set(GDCM_INSTALL_DATA_DIR "share/${projectname}")
endif()
if(NOT GDCM_INSTALL_INCLUDE_DIR)
- set(GDCM_INSTALL_INCLUDE_DIR "include/${subdir}")
+ set(GDCM_INSTALL_INCLUDE_DIR "include/${projectname}")
endif()
if(NOT GDCM_INSTALL_DOC_DIR)
- set(GDCM_INSTALL_DOC_DIR "share/doc/${subdir}")
+ set(GDCM_INSTALL_DOC_DIR "share/doc/${projectname}")
endif()
if(NOT GDCM_INSTALL_MAN_DIR)
@@ -262,7 +262,7 @@ if(NOT GDCM_INSTALL_MAN_DIR)
endif()
if(NOT GDCM_INSTALL_PACKAGE_DIR)
- set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${subdir}
+ set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${projectname}
CACHE INTERNAL "")
endif()

View File

@ -0,0 +1,22 @@
diff --git a/Source/Common/gdcmFilename.cxx b/Source/Common/gdcmFilename.cxx
index 5384510..9c99f94 100644
--- a/Source/Common/gdcmFilename.cxx
+++ b/Source/Common/gdcmFilename.cxx
@@ -16,6 +16,9 @@
#include <climits>
#include <cstdlib> // realpath
#include <cstring>
+#ifdef _WIN32
+# include <windows.h>
+#endif
namespace gdcm
{
@@ -97,7 +100,6 @@ const char *Filename::ToUnixSlashes()
}
#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__))
-#include <windows.h>
inline void Realpath(const char *path, std::string & resolved_path)
{

View File

@ -0,0 +1,39 @@
diff --git a/CMake/ExportConfiguration/GDCMConfig.cmake.in b/CMake/ExportConfiguration/GDCMConfig.cmake.in
index d43d565..dd2023d 100644
--- a/CMake/ExportConfiguration/GDCMConfig.cmake.in
+++ b/CMake/ExportConfiguration/GDCMConfig.cmake.in
@@ -46,8 +46,6 @@ if(EXISTS ${SELF_DIR}/GDCMTargets.cmake)
else()
if(EXISTS ${SELF_DIR}/GDCMExports.cmake)
# This is a build tree
- set( GDCM_INCLUDE_DIRS "@GDCM_INCLUDE_PATH@")
- set(GDCM_LIBRARY_DIRS "@GDCM_LIBRARY_DIR@")
include(${SELF_DIR}/GDCMExports.cmake)
diff --git a/Source/Common/gdcmConfigure.h.in b/Source/Common/gdcmConfigure.h.in
index 4a5d68f..276c0f4 100644
--- a/Source/Common/gdcmConfigure.h.in
+++ b/Source/Common/gdcmConfigure.h.in
@@ -37,9 +37,9 @@
/* Useful in particular for loadshared where the full path
* to the lib is needed */
-#define GDCM_SOURCE_DIR "@GDCM_SOURCE_DIR@"
-#define GDCM_EXECUTABLE_OUTPUT_PATH "@EXECUTABLE_OUTPUT_PATH@"
-#define GDCM_LIBRARY_OUTPUT_PATH "@LIBRARY_OUTPUT_PATH@"
+#define GDCM_SOURCE_DIR ""
+#define GDCM_EXECUTABLE_OUTPUT_PATH ""
+#define GDCM_LIBRARY_OUTPUT_PATH ""
#cmakedefine GDCM_BUILD_TESTING
@@ -81,7 +81,7 @@
/* only cerr, for instance 'invalid file' will be allowed */
#cmakedefine GDCM_DEBUG
-#define GDCM_CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
+#define GDCM_CMAKE_INSTALL_PREFIX ""
#define GDCM_INSTALL_INCLUDE_DIR "@GDCM_INSTALL_INCLUDE_DIR@"
#define GDCM_INSTALL_DATA_DIR "@GDCM_INSTALL_DATA_DIR@"

View File

@ -1,48 +1,35 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO malaterre/GDCM REPO malaterre/GDCM
REF "v${VERSION}" REF "v${VERSION}"
SHA512 a1c45434e925ddac293993014686865aecf1b6745013ed6a141b6ee1bdbe7ddef6abcfc2491583e63f33f4292617ee65412da4c41f38731409df9149903a8772 SHA512 2fe28444cee171a536d63f26c1ad7308a03b946e79dc8b7d648b5c7e6f4a8f52c0c32ec9cf463d95b876db31becc81541638b97fc7f15b79ae04de5988d6941e
HEAD_REF master HEAD_REF master
PATCHES PATCHES
use-openjpeg-config.patch copyright.diff
fix-share-path.patch include-no-namespace.diff
Fix-Cmake_DIR.patch no-absolute-paths.diff
fix-dependence-getopt.patch prefer-config.diff
) )
file(REMOVE "${SOURCE_PATH}/CMake/FindOpenJPEG.cmake") string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(VCPKG_BUILD_SHARED_LIBS ON)
else()
set(VCPKG_BUILD_SHARED_LIBS OFF)
endif()
set(USE_VCPKG_GETOPT OFF)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(USE_VCPKG_GETOPT ON)
endif()
vcpkg_cmake_configure( vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}" SOURCE_PATH "${SOURCE_PATH}"
OPTIONS OPTIONS
-DGDCM_BUILD_DOCBOOK_MANPAGES=OFF -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF
-DGDCM_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} -DGDCM_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DGDCM_INSTALL_INCLUDE_DIR=include
-DGDCM_USE_SYSTEM_EXPAT=ON
-DGDCM_USE_SYSTEM_ZLIB=ON
-DGDCM_USE_SYSTEM_OPENJPEG=ON
-DGDCM_BUILD_TESTING=OFF -DGDCM_BUILD_TESTING=OFF
-DUSE_VCPKG_GETOPT=${USE_VCPKG_GETOPT} -DGDCM_INSTALL_DATA_DIR=share/${PORT}
MAYBE_UNUSED_VARIABLES -DGDCM_INSTALL_DOC_DIR=share/${PORT}/doc
USE_VCPKG_GETOPT -DGDCM_INSTALL_INCLUDE_DIR=include
-DGDCM_INSTALL_PACKAGE_DIR=share/${PORT}
-DGDCM_USE_SYSTEM_EXPAT=ON
-DGDCM_USE_SYSTEM_OPENJPEG=ON
-DGDCM_USE_SYSTEM_ZLIB=ON
) )
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/gdcm) vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
file(REMOVE_RECURSE file(REMOVE_RECURSE
@ -50,22 +37,4 @@ file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/share"
) )
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake" vcpkg_install_copyright(FILE_LIST "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Copyright.txt")
"set(CMAKE_IMPORT_FILE_VERSION 1)"
"set(CMAKE_IMPORT_FILE_VERSION 1)
find_package(OpenJPEG QUIET)"
)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_SOURCE_DIR \"${SOURCE_PATH}\"" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_EXECUTABLE_OUTPUT_PATH \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin\"" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_LIBRARY_OUTPUT_PATH \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin\"" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gdcmConfigure.h" "#define GDCM_CMAKE_INSTALL_PREFIX \"${CURRENT_PACKAGES_DIR}\"" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMConfig.cmake" "set( GDCM_INCLUDE_DIRS \"${SOURCE_PATH}/Source/Common;${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Source/Common;${SOURCE_PATH}/Source/DataStructureAndEncodingDefinition;${SOURCE_PATH}/Source/MediaStorageAndFileFormat;${SOURCE_PATH}/Source/MessageExchangeDefinition;${SOURCE_PATH}/Source/DataDictionary;${SOURCE_PATH}/Source/InformationObjectDefinition\")" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMConfig.cmake" "set(GDCM_LIBRARY_DIRS \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/.\")" "")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/Copyright.txt")

View File

@ -0,0 +1,47 @@
diff --git a/CMake/ExportConfiguration/GDCMConfig.cmake.in b/CMake/ExportConfiguration/GDCMConfig.cmake.in
index 169cb82..c77cf1f 100644
--- a/CMake/ExportConfiguration/GDCMConfig.cmake.in
+++ b/CMake/ExportConfiguration/GDCMConfig.cmake.in
@@ -1,3 +1,7 @@
+include(CMakeFindDependencyMacro)
+find_dependency(expat CONFIG)
+find_dependency(OpenJPEG CONFIG)
+find_dependency(ZLIB)
#-----------------------------------------------------------------------------
#
# GDCMConfig.cmake - CMake configuration file for external projects.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38c65d1..b0cb77b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -360,8 +360,8 @@ else()
endif()
if(GDCM_USE_SYSTEM_OPENJPEG)
- find_package(OpenJPEG 2.0.0 REQUIRED)
- set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES})
+ find_package(OpenJPEG CONFIG REQUIRED)
+ set(GDCM_OPENJPEG_LIBRARIES $<TARGET_NAME:openjp2>)
else()
set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2)
endif()
@@ -401,7 +401,7 @@ if(GDCM_USE_SYSTEM_ZLIB)
# If user say so, then this is a requirement !
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
- set(GDCM_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
+ set(GDCM_ZLIB_LIBRARIES ZLIB::ZLIB)
else()
set(GDCM_ZLIB_LIBRARIES "gdcmzlib")
endif()
@@ -420,8 +420,8 @@ endif()
if(GDCM_USE_SYSTEM_EXPAT)
# If user say so, then this is a requirement !
- find_package(EXPAT REQUIRED)
- set(GDCM_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
+ find_package(expat CONFIG REQUIRED)
+ set(GDCM_EXPAT_LIBRARIES expat::expat)
else()
set(GDCM_EXPAT_LIBRARIES "gdcmexpat")
endif()

View File

@ -1,16 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f82bfd2..a062170 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -375,7 +375,10 @@ else()
endif()
if(GDCM_USE_SYSTEM_OPENJPEG)
- find_package(OpenJPEG 2.0.0 REQUIRED)
+ find_package(OpenJPEG REQUIRED)
+ if(OPENJPEG_MAJOR_VERSION VERSION_LESS 2)
+ message( FATAL_ERROR "You need at least OpenJPEG 2")
+ endif()
set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES})
else()
set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2)

View File

@ -1,15 +1,15 @@
{ {
"name": "gdcm", "name": "gdcm",
"version": "3.0.23", "version": "3.0.24",
"description": "Grassroots DICOM library", "description": "Grassroots DICOM library",
"homepage": "https://github.com/malaterre/GDCM", "homepage": "https://github.com/malaterre/GDCM",
"license": "BSD-3-Clause", "license": null,
"supports": "!uwp & !(windows & arm)", "supports": "!uwp",
"dependencies": [ "dependencies": [
"expat", "expat",
{ {
"name": "getopt", "name": "libiconv",
"platform": "windows & !mingw" "platform": "!windows"
}, },
"openjpeg", "openjpeg",
{ {

View File

@ -489,8 +489,10 @@ intelrdfpmathlib:arm64-android=fail
intelrdfpmathlib:x64-android=fail intelrdfpmathlib:x64-android=fail
irrlicht:x64-android=fail irrlicht:x64-android=fail
isal:x64-android=fail isal:x64-android=fail
# Failing on try_run() in cross builds
itk:arm-neon-android=fail itk:arm-neon-android=fail
itk:arm64-android=fail itk:arm64-android=fail
itk:arm64-windows=fail
itk:x64-android=fail itk:x64-android=fail
jaeger-client-cpp:arm-neon-android=fail jaeger-client-cpp:arm-neon-android=fail
jaeger-client-cpp:x64-android=fail jaeger-client-cpp:x64-android=fail

View File

@ -3013,7 +3013,7 @@
"port-version": 0 "port-version": 0
}, },
"gdcm": { "gdcm": {
"baseline": "3.0.23", "baseline": "3.0.24",
"port-version": 0 "port-version": 0
}, },
"gdcm2": { "gdcm2": {

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "a261e8eb0faf299319bdb0ecfc4ebf76a449bc19",
"version": "3.0.24",
"port-version": 0
},
{ {
"git-tree": "ddb9b48dc350a6e3a539a8d6e43e5416955d1de5", "git-tree": "ddb9b48dc350a6e3a539a8d6e43e5416955d1de5",
"version": "3.0.23", "version": "3.0.23",