mirror of https://github.com/microsoft/vcpkg.git
[Dcmtk] enable dependencies (#26255)
* dcmtk: Enable dependencies, shared libs, stl, c++17 ... * dcmtk: Update port version * modify portfile based on comments from the review * Update version database * Use vcpkg_check_features' FEATURE_OPTIONS and other nitipicks. Co-authored-by: ALittleDruid <297957399@qq.com> Co-authored-by: Billy O'Neal <bion@microsoft.com>
This commit is contained in:
parent
f2b8c684a0
commit
4330517344
|
|
@ -1,40 +1,127 @@
|
|||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO DCMTK/dcmtk
|
||||
REF a137f1aff4e1df3fbefe53ee8b160973c74c96dd # DCMTK-3.6.7
|
||||
SHA512 dd41b38ef5d02ac2bf4071e1c27814e03357bc6a51eef59daf47a86d024d7fcbaaa1a71df8600fb8180f8b6537d45d6bf48a00730c1fa9d147778f36ff3e425a
|
||||
HEAD_REF master
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/dcmtk.patch
|
||||
PATCHES
|
||||
dcmtk.patch
|
||||
windows-patch.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
"iconv" DCMTK_WITH_ICONV
|
||||
"icu" DCMTK_WITH_ICU
|
||||
"openssl" DCMTK_WITH_OPENSSL
|
||||
"png" DCMTK_WITH_PNG
|
||||
"tiff" DCMTK_WITH_TIFF
|
||||
"xml2" DCMTK_WITH_XML
|
||||
"zlib" DCMTK_WITH_ZLIB
|
||||
"tools" BUILD_APPS
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DDCMTK_WITH_DOXYGEN=OFF
|
||||
-DDCMTK_WITH_ZLIB=OFF
|
||||
-DDCMTK_WITH_OPENSSL=OFF
|
||||
-DDCMTK_WITH_PNG=OFF
|
||||
-DDCMTK_WITH_TIFF=OFF
|
||||
-DDCMTK_WITH_XML=OFF
|
||||
-DDCMTK_WITH_ICONV=OFF
|
||||
-DDCMTK_FORCE_FPIC_ON_UNIX=ON
|
||||
-DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS=OFF
|
||||
-DDCMTK_ENABLE_PRIVATE_TAGS=ON
|
||||
-DBUILD_APPS=OFF
|
||||
-DDCMTK_ENABLE_CXX11=ON
|
||||
-DCMAKE_CXX_STANDARD=17
|
||||
-DDCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS=ON
|
||||
-DDCMTK_WIDE_CHAR_MAIN_FUNCTION=ON
|
||||
-DDCMTK_ENABLE_STL=ON
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
OPTIONS_DEBUG
|
||||
-DINSTALL_HEADERS=OFF
|
||||
-DINSTALL_OTHER=OFF
|
||||
-DBUILD_APPS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if ("tools" IN_LIST FEATURES)
|
||||
set(_tools
|
||||
cda2dcm
|
||||
dcm2json
|
||||
dcm2pdf
|
||||
dcm2pnm
|
||||
dcm2xml
|
||||
dcmcjpeg
|
||||
dcmcjpls
|
||||
dcmconv
|
||||
dcmcrle
|
||||
dcmdata_tests
|
||||
dcmdjpeg
|
||||
dcmdjpls
|
||||
dcmdrle
|
||||
dcmdspfn
|
||||
dcmdump
|
||||
dcmect_tests
|
||||
dcmfg_tests
|
||||
dcmftest
|
||||
dcmgpdir
|
||||
dcmicmp
|
||||
dcmiod_tests
|
||||
dcmj2pnm
|
||||
dcml2pnm
|
||||
dcmmkcrv
|
||||
dcmmkdir
|
||||
dcmmklut
|
||||
dcmnet_tests
|
||||
dcmodify
|
||||
dcmp2pgm
|
||||
dcmprscp
|
||||
dcmprscu
|
||||
dcmpschk
|
||||
dcmpsmk
|
||||
dcmpsprt
|
||||
dcmpsrcv
|
||||
dcmpssnd
|
||||
dcmqridx
|
||||
dcmqrscp
|
||||
dcmqrti
|
||||
dcmquant
|
||||
dcmrecv
|
||||
dcmrt_tests
|
||||
dcmscale
|
||||
dcmseg_tests
|
||||
dcmsend
|
||||
dcmsign
|
||||
dcmsr_tests
|
||||
dcmtls_tests
|
||||
dcod2lum
|
||||
dconvlum
|
||||
drtdump
|
||||
drttest
|
||||
dsr2html
|
||||
dsr2xml
|
||||
dsrdump
|
||||
dump2dcm
|
||||
echoscu
|
||||
findscu
|
||||
getscu
|
||||
img2dcm
|
||||
mkreport
|
||||
movescu
|
||||
msgserv
|
||||
ofstd_tests
|
||||
pdf2dcm
|
||||
stl2dcm
|
||||
storescp
|
||||
storescu
|
||||
termscu
|
||||
wlmscpfs
|
||||
wltest
|
||||
xml2dcm
|
||||
xml2dsr
|
||||
)
|
||||
vcpkg_copy_tools(TOOL_NAMES ${_tools} AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
|
@ -46,5 +133,5 @@ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dcmtk/config/osconfig.h" "
|
|||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dcmtk/config/osconfig.h" "#define DEFAULT_SUPPORT_DATA_DIR \"${CURRENT_PACKAGES_DIR}/share/dcmtk/\"" "")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/dcmtk" RENAME copyright)
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "dcmtk",
|
||||
"version": "3.6.7",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard.",
|
||||
"homepage": "https://github.com/DCMTK/dcmtk",
|
||||
"license": "BSD-3-Clause OR BSD-2-Clause OR libtiff OR MIT OR Zlib OR Libpng",
|
||||
|
|
@ -15,5 +15,52 @@
|
|||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"iconv": {
|
||||
"description": "Enable Iconv support",
|
||||
"dependencies": [
|
||||
"libiconv"
|
||||
]
|
||||
},
|
||||
"icu": {
|
||||
"description": "Enable ICU support",
|
||||
"dependencies": [
|
||||
"icu"
|
||||
]
|
||||
},
|
||||
"openssl": {
|
||||
"description": "Enable OpenSSL",
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"png": {
|
||||
"description": "Enable PNG support",
|
||||
"dependencies": [
|
||||
"libpng"
|
||||
]
|
||||
},
|
||||
"tiff": {
|
||||
"description": "Enable TIFF support",
|
||||
"dependencies": [
|
||||
"tiff"
|
||||
]
|
||||
},
|
||||
"tools": {
|
||||
"description": "Build apps"
|
||||
},
|
||||
"xml2": {
|
||||
"description": "Enable XML support",
|
||||
"dependencies": [
|
||||
"libxml2"
|
||||
]
|
||||
},
|
||||
"zlib": {
|
||||
"description": "Enable zlib support",
|
||||
"dependencies": [
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
diff --git a/CMake/3rdparty.cmake b/CMake/3rdparty.cmake
|
||||
index 47e3476..2c974e8 100644
|
||||
--- a/CMake/3rdparty.cmake
|
||||
+++ b/CMake/3rdparty.cmake
|
||||
@@ -3,11 +3,7 @@ if(WIN32)
|
||||
# For Windows, we don't used FIND_PACKAGE because DCMTK usually is used with its
|
||||
# own set of 3rd-party support libraries that can be downloaded from DCMTK's
|
||||
# website (pre-built).
|
||||
- if(MINGW)
|
||||
- set(DCMTK_USE_FIND_PACKAGE TRUE CACHE BOOL "${USE_FIND_PACKAGE_DOCS}")
|
||||
- else()
|
||||
- set(DCMTK_USE_FIND_PACKAGE FALSE CACHE BOOL "${USE_FIND_PACKAGE_DOCS}")
|
||||
- endif()
|
||||
+ set(DCMTK_USE_FIND_PACKAGE TRUE CACHE BOOL "${USE_FIND_PACKAGE_DOCS}")
|
||||
else()
|
||||
# Only find_package is supported
|
||||
set(DCMTK_USE_FIND_PACKAGE TRUE CACHE BOOL "${USE_FIND_PACKAGE_DOCS}")
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9f8d268..28ddc3e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -4,6 +4,10 @@ cmake_minimum_required(VERSION 3.0.0...3.13.2 FATAL_ERROR)
|
||||
# Declare project
|
||||
project(DCMTK)
|
||||
|
||||
+if(MSVC)
|
||||
+ string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus")
|
||||
+endif()
|
||||
+
|
||||
#-----------------------------------------------------------------------------
|
||||
# General project settings to configure DCMTK build process
|
||||
#-----------------------------------------------------------------------------
|
||||
|
|
@ -1858,7 +1858,7 @@
|
|||
},
|
||||
"dcmtk": {
|
||||
"baseline": "3.6.7",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"debug-assert": {
|
||||
"baseline": "1.3.3",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "cbfc85b6b840eb68b947c8b9bd69988c938198d3",
|
||||
"version": "3.6.7",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "c08360f31aa07d9514b52b3c98ca6c5ae6e17bb2",
|
||||
"version": "3.6.7",
|
||||
|
|
|
|||
Loading…
Reference in New Issue