2020-08-03 06:49:20 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2023-10-17 03:13:13 +08:00
|
|
|
REPO NIFTI-Imaging/nifti_clib
|
|
|
|
REF 5a8016be2161058f116b39ca476734bd81bb83c5
|
|
|
|
SHA512 782cb4e494d73b054f8e3ab5f059b952fa461ceb3a0e12989ef1485675d1009d107c496abe6a495fbc30214d92859faad2c58a3edb10899114b440476b613315
|
2020-08-03 06:49:20 +08:00
|
|
|
HEAD_REF master
|
2023-10-17 03:13:13 +08:00
|
|
|
PATCHES
|
|
|
|
zlib_include.patch
|
2020-08-03 06:49:20 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
2023-02-04 06:22:38 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES
|
2020-08-03 06:49:20 +08:00
|
|
|
"cifti" USE_CIFTI_CODE
|
|
|
|
"fsl" USE_FSL_CODE
|
|
|
|
"nifti2" USE_NIFTI2_CODE
|
|
|
|
"nifticdf" USE_NIFTICDF_CODE
|
|
|
|
"tools" NIFTI_BUILD_APPLICATIONS
|
|
|
|
"tests" BUILD_TESTING
|
|
|
|
)
|
|
|
|
set(TOOL_NAMES)
|
|
|
|
if("tools" IN_LIST FEATURES)
|
2023-02-04 06:22:38 +08:00
|
|
|
list(APPEND TOOL_NAMES nifti1_tool)
|
|
|
|
if("nifti2" IN_LIST FEATURES)
|
|
|
|
list(APPEND TOOL_NAMES nifti_tool)
|
|
|
|
endif()
|
|
|
|
if("nifticdf" IN_LIST FEATURES)
|
|
|
|
list(APPEND TOOL_NAMES nifti_stats)
|
|
|
|
endif()
|
|
|
|
if("cifti" IN_LIST FEATURES AND "nifti2" IN_LIST FEATURES)
|
|
|
|
list(APPEND TOOL_NAMES cifti_tool afni_xml_tool)
|
|
|
|
endif()
|
2020-08-03 06:49:20 +08:00
|
|
|
endif()
|
|
|
|
|
2023-02-04 06:22:38 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-08-03 06:49:20 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
)
|
|
|
|
|
2023-02-04 06:22:38 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-08-03 06:49:20 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2023-03-15 03:09:03 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/NIFTI PACKAGE_NAME nifti)
|
2020-08-03 06:49:20 +08:00
|
|
|
|
|
|
|
if(TOOL_NAMES)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2023-10-17 03:13:13 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|