vcpkg/ports/vtk-dicom/portfile.cmake

43 lines
1.1 KiB
CMake
Raw Normal View History

include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO dgobbi/vtk-dicom
REF faf41f35652fcdd66038e623dff5fbc748ccf15b
SHA512 8e03e24e28420e48046f15305ea4b8120ac6a4e34eef2f6d1f38e4ebde16e037e7383ff53c3091e939167fadccbbcbe6471bb8ac8c56c9232d3992c56489a102
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)