vcpkg/ports/minc/portfile.cmake
Jack·Boos·Yu 8f8f7168ee
[cmake] update to 3.19.2 (#14716)
* [cmake] update to 3.19.0

* update vmss

* [cmake] update to 3.19.1

* [solid3] Fix configure error, fix static definition

* [flann] Add feature hdf5 and fix it

* [highfive] Fix dependency hdf5

* [simage] Fix configure error

* [aws-c-common] Fix configure error

* [cmake] Update to 3.19.2

* Revert changes about cmake bug

* [VMSS] Update cmake path on Windows

* [cmake] Update cmake hash

* [minc] Fix dependency hdf5

* [cmake] Update cmake package name and path on MacOS

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-12-28 21:21:03 -08:00

50 lines
1.5 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO BIC-MNI/libminc
REF e75a936c12a305b596d743c26a5437196ebce2a4
SHA512 744f879ac8f0594c310d1c1b7fe67543c5feeb3e5a0979035918dbb2bf1d0973fbd389e5357a75631e618cc614b648c21179f7467576bd68e3522e63f21451b0
HEAD_REF master
PATCHES
build.patch
config.patch
fix-dependency-hdf5.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"minc1" LIBMINC_MINC1_SUPPORT
)
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Symbols are not properly exported
endif()
set(OPTIONS)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND OPTIONS "-DLIBMINC_BUILD_SHARED_LIBS=ON")
else()
list(APPEND OPTIONS "-DLIBMINC_BUILD_SHARED_LIBS=OFF")
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
OPTIONS
"-DBUILD_TESTING=OFF"
"-DLIBMINC_USE_SYSTEM_NIFTI=ON"
${OPTIONS}
${FEATURE_OPTIONS}
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/libminc)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)