mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
Updated ISMRMRD to 1.4. Removed patch for HDF5 dependency as that should not be optional on platforms with HDF5 available (#6111)
This commit is contained in:
parent
25d80a74d6
commit
9c54cc9fab
@ -1,8 +1,4 @@
|
|||||||
Source: ismrmrd
|
Source: ismrmrd
|
||||||
Version: 1.3.2-4
|
Version: 1.4
|
||||||
Description: ISMRM Raw Data Format
|
Description: ISMRM Raw Data Format
|
||||||
Build-Depends: pugixml
|
Build-Depends: pugixml, hdf5
|
||||||
|
|
||||||
Feature: dataset
|
|
||||||
Description: Dataset and file support
|
|
||||||
Build-Depends: hdf5
|
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 456d4f4..3c235f2 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -7,6 +7,7 @@ set (ISMRMRD_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake CACHE PATH
|
|
||||||
|
|
||||||
# command line options
|
|
||||||
option(USE_SYSTEM_PUGIXML "Use pugixml installed on the system" OFF)
|
|
||||||
+option(USE_HDF5_DATASET_SUPPORT "Use HDF5 library for dataset support" OFF)
|
|
||||||
|
|
||||||
# and include it to the search list
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${ISMRMRD_CMAKE_DIR})
|
|
||||||
@@ -91,18 +92,23 @@ endif()
|
|
||||||
set(ISMRMRD_VERSION_STRING ${ISMRMRD_VERSION_MAJOR}.${ISMRMRD_VERSION_MINOR}.${ISMRMRD_VERSION_PATCH})
|
|
||||||
set(ISMRMRD_SOVERSION ${ISMRMRD_VERSION_MAJOR}.${ISMRMRD_VERSION_MINOR})
|
|
||||||
|
|
||||||
-# Find HDF5 for dataset support
|
|
||||||
-find_package(HDF5 1.8 COMPONENTS C)
|
|
||||||
-
|
|
||||||
-if (HDF5_FOUND)
|
|
||||||
- set (ISMRMRD_DATASET_SUPPORT true)
|
|
||||||
- set (ISMRMRD_DATASET_SOURCES libsrc/dataset.c libsrc/dataset.cpp)
|
|
||||||
- set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
|
|
||||||
- set (ISMRMRD_DATASET_LIBRARIES ${HDF5_LIBRARIES})
|
|
||||||
-else (HDF5_FOUND)
|
|
||||||
+if (USE_HDF5_DATASET_SUPPORT)
|
|
||||||
+ # Find HDF5 for dataset support
|
|
||||||
+ find_package(HDF5 1.8 COMPONENTS C)
|
|
||||||
+
|
|
||||||
+ if (HDF5_FOUND)
|
|
||||||
+ set (ISMRMRD_DATASET_SUPPORT true)
|
|
||||||
+ set (ISMRMRD_DATASET_SOURCES libsrc/dataset.c libsrc/dataset.cpp)
|
|
||||||
+ set (ISMRMRD_DATASET_INCLUDE_DIR ${HDF5_C_INCLUDE_DIR})
|
|
||||||
+ set (ISMRMRD_DATASET_LIBRARIES ${HDF5_LIBRARIES})
|
|
||||||
+ elseif (USE_HDF5_DATASET_SUPPORT)
|
|
||||||
+ set (ISMRMRD_DATASET_SUPPORT false)
|
|
||||||
+ # Dataset and file support was explicitly requested, force failure rather than succeed without support.
|
|
||||||
+ message (FATAL_ERROR "HDF5 not found. Dataset and file support unavailable!")
|
|
||||||
+ endif (HDF5_FOUND)
|
|
||||||
+else (USE_HDF5_DATASET_SUPPORT)
|
|
||||||
set (ISMRMRD_DATASET_SUPPORT false)
|
|
||||||
- message (WARNING "HDF5 not found. Dataset and file support unavailable!")
|
|
||||||
-endif (HDF5_FOUND)
|
|
||||||
+endif (USE_HDF5_DATASET_SUPPORT)
|
|
||||||
|
|
||||||
# Generate the version.h header file
|
|
||||||
find_package(Git)
|
|
||||||
@@ -127,7 +133,7 @@ install(FILES ${CMAKE_BINARY_DIR}/include/ismrmrd/version.h DESTINATION include/
|
|
||||||
|
|
||||||
# --- Main Library (begin) ----
|
|
||||||
# in windows, install the HDF5 dependencies
|
|
||||||
-if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
|
|
||||||
+if (USE_HDF5_DATASET_SUPPORT AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
|
|
||||||
if(DEFINED ENV{HDF5_ROOT})
|
|
||||||
set(HDF5_BIN_DIR $ENV{HDF5_ROOT}/bin)
|
|
||||||
else (DEFINED ENV{HDF5_ROOT})
|
|
||||||
@@ -135,7 +141,7 @@ if (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
|
|
||||||
endif (DEFINED ENV{HDF5_ROOT})
|
|
||||||
message("Install hdf5 libraries from ${HDF5_BIN_DIR} ")
|
|
||||||
install( DIRECTORY ${HDF5_BIN_DIR} DESTINATION bin/.. FILES_MATCHING PATTERN "*.dll" )
|
|
||||||
-endif (HDF5_FOUND AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
|
|
||||||
+endif (USE_HDF5_DATASET_SUPPORT AND WIN32 AND ISMRMRD_INSTALL_DEPENDENCIES)
|
|
||||||
|
|
||||||
# include directories for main library
|
|
||||||
set(ISMRMRD_TARGET_INCLUDE_DIRS
|
|
||||||
@@ -199,9 +205,9 @@ install(FILES cmake/FindIsmrmrd.cmake cmake/FindFFTW3.cmake DESTINATION share/is
|
|
||||||
add_subdirectory(doc)
|
|
||||||
|
|
||||||
add_subdirectory(utilities)
|
|
||||||
-if (HDF5_FOUND)
|
|
||||||
+if (USE_HDF5_DATASET_SUPPORT)
|
|
||||||
add_subdirectory(examples/c)
|
|
||||||
-endif (HDF5_FOUND)
|
|
||||||
+endif (USE_HDF5_DATASET_SUPPORT)
|
|
||||||
|
|
||||||
# TODO: make this work on Windows
|
|
||||||
if (NOT WIN32)
|
|
@ -1,56 +1,78 @@
|
|||||||
include(vcpkg_common_functions)
|
include(vcpkg_common_functions)
|
||||||
|
|
||||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
||||||
|
|
||||||
vcpkg_from_github(
|
if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
set(WIN32_INCLUDE_STDDEF "x86-windows-include-stddef.patch")
|
||||||
REPO ismrmrd/ismrmrd
|
endif()
|
||||||
REF v1.3.2
|
|
||||||
SHA512 eb806f71c4b183105b3270d658a68195e009c0f7ca37f54f76d650a4d5c83c44d26b5f12a4c47c608aae9990cd04f1204b0c57e6438ca34a271fd54880133106
|
vcpkg_from_github(
|
||||||
HEAD_REF master
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
PATCHES
|
REPO ismrmrd/ismrmrd
|
||||||
# Makes optional hdf5 dependency explicit
|
REF 0d05ad0cf0b09adb975566ff6a817a01d69f4325
|
||||||
optional_hdf5_dependency.patch
|
SHA512 7127658c3339ca3022a61093fb037aa02ac0cec4885e03657935dc41bc7266e74b437108cd0a9455c91bc74bdbb6e3a182752effca3564a36d3ddc29d3972496
|
||||||
)
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
if ("dataset" IN_LIST FEATURES)
|
${WIN32_INCLUDE_STDDEF}
|
||||||
set(ENABLE_DATASET ON)
|
)
|
||||||
else()
|
|
||||||
set(ENABLE_DATASET OFF)
|
|
||||||
endif()
|
|
||||||
|
vcpkg_configure_cmake(
|
||||||
vcpkg_configure_cmake(
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
PREFER_NINJA
|
||||||
PREFER_NINJA
|
OPTIONS
|
||||||
OPTIONS
|
-DUSE_SYSTEM_PUGIXML=ON
|
||||||
-DUSE_SYSTEM_PUGIXML=ON
|
-DUSE_HDF5_DATASET_SUPPORT=ON
|
||||||
-DUSE_HDF5_DATASET_SUPPORT=${ENABLE_DATASET}
|
)
|
||||||
)
|
|
||||||
|
vcpkg_install_cmake()
|
||||||
vcpkg_install_cmake()
|
vcpkg_copy_pdbs()
|
||||||
vcpkg_copy_pdbs()
|
|
||||||
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/ismrmrd/cmake)
|
||||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/ismrmrd/cmake)
|
|
||||||
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(COPY ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
|
||||||
|
endif()
|
||||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
|
|
||||||
file(COPY ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll)
|
file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
endif()
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
|
||||||
|
endif()
|
||||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
|
|
||||||
file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/FindFFTW3.cmake)
|
||||||
endif()
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/FindFFTW3.cmake)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/FindFFTW3.cmake)
|
||||||
file(COPY ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/ismrmrd)
|
|
||||||
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/ismrmrd/cmake)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe)
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe)
|
set(ISMRMRD_CMAKE_DIRS ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||||
|
foreach(ISMRMRD_CMAKE_DIR IN LISTS ISMRMRD_CMAKE_DIRS)
|
||||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd)
|
if (EXISTS ${ISMRMRD_CMAKE_DIR})
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright)
|
file(GLOB ISMRMRD_CMAKE_FILES "${ISMRMRD_CMAKE_DIR}/ISMRMRD/ISMRMRD*.cmake")
|
||||||
|
foreach(ICF ${ISMRMRD_CMAKE_FILES})
|
||||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd)
|
file(COPY ${ICF} DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd/cmake/)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
file(REMOVE_RECURSE ${ISMRMRD_CMAKE_DIRS})
|
||||||
|
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe)
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_c_example.exe)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_c_example.exe)
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_read_timing_test.exe)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_read_timing_test.exe)
|
||||||
|
|
||||||
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd)
|
||||||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright)
|
||||||
|
|
||||||
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd)
|
||||||
|
14
ports/ismrmrd/x86-windows-include-stddef.patch
Normal file
14
ports/ismrmrd/x86-windows-include-stddef.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/include/ismrmrd/ismrmrd.h b/include/ismrmrd/ismrmrd.h
|
||||||
|
index 40614eb..e5e3e25 100644
|
||||||
|
--- a/include/ismrmrd/ismrmrd.h
|
||||||
|
+++ b/include/ismrmrd/ismrmrd.h
|
||||||
|
@@ -30,6 +30,9 @@ typedef unsigned __int32 uint32_t;
|
||||||
|
typedef __int64 int64_t;
|
||||||
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#endif
|
||||||
|
+#if _WIN32
|
||||||
|
+#include <stddef.h> /* for size_t */
|
||||||
|
+#endif
|
||||||
|
#else /* non MS C or C++ compiler */
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stddef.h> /* for size_t */
|
Loading…
x
Reference in New Issue
Block a user