From 473248862a0eafbfb802fc1d8ad554096795ce06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mewes?= Date: Tue, 22 May 2018 08:38:05 +0200 Subject: [PATCH] New Package vtk-dicom (#3449) * add CONTROL and portfile.cmake for vtk-dicom standalone package Can make use of the feature 'gdcm' to decompress DICOM files for use with VTK. * fix CAPSLOCK typo -.- * [vtk-dicom] Remove BUILD_SHARED_LIBS because it is automatically provided --- ports/vtk-dicom/CONTROL | 8 +++++++ ports/vtk-dicom/portfile.cmake | 42 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ports/vtk-dicom/CONTROL create mode 100644 ports/vtk-dicom/portfile.cmake diff --git a/ports/vtk-dicom/CONTROL b/ports/vtk-dicom/CONTROL new file mode 100644 index 00000000000..fdd8e04d3cd --- /dev/null +++ b/ports/vtk-dicom/CONTROL @@ -0,0 +1,8 @@ +Source: vtk-dicom +Version: 0.8.8-alpha-1 +Description: DICOM for VTK +Build-Depends: vtk, zlib + +Feature: gdcm +Description: Use gdcm for decompressing DICOM files. +Build-Depends: gdcm2 diff --git a/ports/vtk-dicom/portfile.cmake b/ports/vtk-dicom/portfile.cmake new file mode 100644 index 00000000000..e7f5c65aa18 --- /dev/null +++ b/ports/vtk-dicom/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dgobbi/vtk-dicom + REF ca27801fad6356c98ba19e760b9b4b8e9128f60e + SHA512 d4916fa385e6f26da0a5d7eb981497c9121ff4f67b4b03e518aa4974d2b0ef207168e939e5063e705c15f627ace56e39aca5f5891d333924cbc80c9277aa7dd2 + HEAD_REF master +) + +if ("gdcm" IN_LIST FEATURES) + set(USE_GDCM ON ) +else() + set(USE_GDCM OFF ) +endif() + + +if(USE_GDCM) + list(APPEND ADDITIONAL_OPTIONS + -DUSE_GDCM=ON + -DUSE_DCMTK=OFF + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_PROGRAMS=OFF + -DBUILD_EXAMPLES=OFF + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk-dicom) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/copyright)