diff options
Diffstat (limited to 'ports/gdcm')
| -rw-r--r-- | ports/gdcm/CONTROL | 2 | ||||
| -rw-r--r-- | ports/gdcm/portfile.cmake | 15 | ||||
| -rw-r--r-- | ports/gdcm/use-expat-config.patch | 13 |
3 files changed, 24 insertions, 6 deletions
diff --git a/ports/gdcm/CONTROL b/ports/gdcm/CONTROL index 85f634cd6..e6d6b052d 100644 --- a/ports/gdcm/CONTROL +++ b/ports/gdcm/CONTROL @@ -1,5 +1,7 @@ Source: gdcm Version: 3.0.5 +Port-Version: 1 Homepage: https://github.com/malaterre/GDCM Description: Grassroots DICOM library Build-Depends: zlib, expat, openjpeg +Supports: !uwp
\ No newline at end of file diff --git a/ports/gdcm/portfile.cmake b/ports/gdcm/portfile.cmake index 5626e812b..e9afedd3c 100644 --- a/ports/gdcm/portfile.cmake +++ b/ports/gdcm/portfile.cmake @@ -1,3 +1,5 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -10,6 +12,7 @@ vcpkg_from_github( use-openjpeg-config.patch fix-share-path.patch Fix-Cmake_DIR.patch + use-expat-config.patch ) file(REMOVE ${SOURCE_PATH}/CMake/FindOpenJPEG.cmake) @@ -42,14 +45,14 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) -file(READ ${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake GDCM_TARGETS) -string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" - "set(CMAKE_IMPORT_FILE_VERSION 1) -find_package(OpenJPEG QUIET)" GDCM_TARGETS "${GDCM_TARGETS}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake "${GDCM_TARGETS}") +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake + "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1) + find_package(OpenJPEG QUIET)" +) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file diff --git a/ports/gdcm/use-expat-config.patch b/ports/gdcm/use-expat-config.patch new file mode 100644 index 000000000..94a54e6c7 --- /dev/null +++ b/ports/gdcm/use-expat-config.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 32786db..4215d25 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -426,7 +426,7 @@ endif()
+
+ if(GDCM_USE_SYSTEM_EXPAT)
+ # If user say so, then this is a requirement !
+- find_package(EXPAT REQUIRED)
++ find_package(expat CONFIG REQUIRED)
+ set(GDCM_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
+ else()
+ set(GDCM_EXPAT_LIBRARIES "gdcmexpat")
|
