mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[itk] update to 5.4.0 (#39757)
This commit is contained in:
parent
11884e49a8
commit
3fc777f03d
@ -1,12 +0,0 @@
|
||||
diff --git a/CMake/ITKInitializeCXXStandard.cmake b/CMake/ITKInitializeCXXStandard.cmake
|
||||
index 5345230b..a9ca48c3 100644
|
||||
--- a/CMake/ITKInitializeCXXStandard.cmake
|
||||
+++ b/CMake/ITKInitializeCXXStandard.cmake
|
||||
@@ -1,6 +1,6 @@
|
||||
## Set the default target properties for ITK
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
- set(CMAKE_CXX_STANDARD 14) # Supported values are 14, 17, 20, and 23.
|
||||
+ set(CMAKE_CXX_STANDARD 17) # Supported values are 14, 17, 20, and 23.
|
||||
endif()
|
||||
if(NOT CMAKE_CXX_STANDARD_REQUIRED)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
@ -4,7 +4,7 @@ index 16c611fd3..13978724c 100644
|
||||
+++ b/Modules/ThirdParty/DoubleConversion/CMakeLists.txt
|
||||
@@ -9,7 +9,16 @@ mark_as_advanced(ITK_USE_SYSTEM_DOUBLECONVERSION)
|
||||
if(ITK_USE_SYSTEM_DOUBLECONVERSION)
|
||||
find_package(double-conversion REQUIRED)
|
||||
find_package(double-conversion 3.1.6 REQUIRED)
|
||||
get_target_property(ITKDoubleConversion_INCLUDE_DIRS double-conversion::double-conversion INTERFACE_INCLUDE_DIRECTORIES)
|
||||
- get_target_property(ITKDoubleConversion_LIBRARIES double-conversion::double-conversion LOCATION)
|
||||
+ get_target_property(ITKDoubleConversion_LIBRARY_RELEASE double-conversion::double-conversion IMPORTED_IMPLIB_RELEASE)
|
||||
|
@ -1,23 +1,3 @@
|
||||
diff --git a/Modules/Core/GPUCommon/CMakeLists.txt b/Modules/Core/GPUCommon/CMakeLists.txt
|
||||
index da2d66b63..6fb476680 100644
|
||||
--- a/Modules/Core/GPUCommon/CMakeLists.txt
|
||||
+++ b/Modules/Core/GPUCommon/CMakeLists.txt
|
||||
@@ -24,9 +24,13 @@ if(ITK_USE_GPU AND APPLE AND NOT ITK_COMPILER_HAS_BLOCKS)
|
||||
endif()
|
||||
|
||||
if(ITK_USE_GPU)
|
||||
+ message(STATUS "OPENCL_LIBRARIES:${OPENCL_LIBRARIES}")
|
||||
+ if(TARGET OpenCL::OpenCL)
|
||||
+ message(STATUS "OPENCL_LIBRARIES:${OpenCL_LIBRARIES}")
|
||||
+ endif()
|
||||
set(ITKGPUCommon_LIBRARIES ITKGPUCommon)
|
||||
- set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})
|
||||
- set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
|
||||
+ set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS})
|
||||
+ set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(NOT ITK_SOURCE_DIR)
|
||||
diff --git a/Modules/Core/GPUCommon/src/CMakeLists.txt b/Modules/Core/GPUCommon/src/CMakeLists.txt
|
||||
index 0b39f2a9a..160f7a752 100644
|
||||
--- a/Modules/Core/GPUCommon/src/CMakeLists.txt
|
||||
|
@ -37,7 +37,7 @@ index 1b1fe9526..0da4aa0c4 100644
|
||||
|
||||
@@ -139,22 +137,16 @@ JPEG2000ImageIO::ReadImageInformation()
|
||||
{
|
||||
itkDebugMacro(<< "ReadImageInformation()");
|
||||
itkDebugMacro("ReadImageInformation()");
|
||||
|
||||
- FILE * l_file = fopen(this->m_FileName.c_str(), "rb");
|
||||
-
|
||||
@ -136,7 +136,7 @@ index 1b1fe9526..0da4aa0c4 100644
|
||||
- OPJ_UINT32 l_nb_tiles_x;
|
||||
- OPJ_UINT32 l_nb_tiles_y;
|
||||
|
||||
itkDebugMacro(<< "Trying to read header now...");
|
||||
itkDebugMacro("Trying to read header now...");
|
||||
|
||||
- bResult = opj_read_header(this->m_Internal->m_Dinfo,
|
||||
- &l_image,
|
||||
@ -175,7 +175,7 @@ index 1b1fe9526..0da4aa0c4 100644
|
||||
+ this->m_Internal->m_NumberOfTiles = l_nb_tiles;
|
||||
|
||||
|
||||
itkDebugMacro(<< "Number of Components = " << l_image->numcomps);
|
||||
itkDebugMacro("Number of Components = " << l_image->numcomps);
|
||||
@@ -319,7 +302,7 @@ JPEG2000ImageIO::ReadImageInformation()
|
||||
this->SetPixelType(IOPixelEnum::SCALAR);
|
||||
break;
|
||||
@ -183,18 +183,18 @@ index 1b1fe9526..0da4aa0c4 100644
|
||||
- if (l_image->color_space != CLRSPC_SRGB)
|
||||
+ if (l_image->color_space != OPJ_CLRSPC_SRGB)
|
||||
{
|
||||
itkWarningMacro(<< "file does not specify color space, assuming sRGB");
|
||||
itkWarningMacro("file does not specify color space, assuming sRGB");
|
||||
}
|
||||
@@ -335,8 +318,7 @@ JPEG2000ImageIO::ReadImageInformation()
|
||||
itkDebugMacro(<< "Tile Start Y = " << this->m_Internal->m_TileStartY);
|
||||
itkDebugMacro(<< "Tile Width = " << this->m_Internal->m_TileWidth);
|
||||
itkDebugMacro(<< "Tile Height = " << this->m_Internal->m_TileHeight);
|
||||
- itkDebugMacro(<< "Number of Tiles X = " << this->m_Internal->m_NumberOfTilesInX);
|
||||
- itkDebugMacro(<< "Number of Tiles Y = " << this->m_Internal->m_NumberOfTilesInY);
|
||||
+ itkDebugMacro(<< "Number of Tiles = " << this->m_Internal->m_NumberOfTiles);
|
||||
itkDebugMacro("Tile Start Y = " << this->m_Internal->m_TileStartY);
|
||||
itkDebugMacro("Tile Width = " << this->m_Internal->m_TileWidth);
|
||||
itkDebugMacro("Tile Height = " << this->m_Internal->m_TileHeight);
|
||||
- itkDebugMacro("Number of Tiles X = " << this->m_Internal->m_NumberOfTilesInX);
|
||||
- itkDebugMacro("Number of Tiles Y = " << this->m_Internal->m_NumberOfTilesInY);
|
||||
+ itkDebugMacro("Number of Tiles = " << this->m_Internal->m_NumberOfTiles);
|
||||
|
||||
itkDebugMacro(<< "image->x1 = " << l_image->x1);
|
||||
itkDebugMacro(<< "image->y1 = " << l_image->y1);
|
||||
itkDebugMacro("image->x1 = " << l_image->x1);
|
||||
itkDebugMacro("image->y1 = " << l_image->y1);
|
||||
@@ -349,7 +331,6 @@ JPEG2000ImageIO::ReadImageInformation()
|
||||
|
||||
/* close the byte stream */
|
||||
@ -205,7 +205,7 @@ index 1b1fe9526..0da4aa0c4 100644
|
||||
{
|
||||
@@ -368,16 +349,7 @@ JPEG2000ImageIO::Read(void * buffer)
|
||||
{
|
||||
itkDebugMacro(<< "JPEG2000ImageIO::Read() Begin");
|
||||
itkDebugMacro("JPEG2000ImageIO::Read() Begin");
|
||||
|
||||
- FILE * l_file = fopen(this->m_FileName.c_str(), "rb");
|
||||
-
|
||||
@ -307,13 +307,13 @@ index 1b1fe9526..0da4aa0c4 100644
|
||||
<< "Reason: opj_read_header returns false");
|
||||
}
|
||||
@@ -499,7 +458,7 @@ JPEG2000ImageIO::Read(void * buffer)
|
||||
itkDebugMacro(<< "p_end_x = " << p_end_x);
|
||||
itkDebugMacro(<< "p_end_y = " << p_end_y);
|
||||
itkDebugMacro("p_end_x = " << p_end_x);
|
||||
itkDebugMacro("p_end_y = " << p_end_y);
|
||||
|
||||
- bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, p_start_x, p_start_y, p_end_x, p_end_y);
|
||||
+ bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, l_image, p_start_x, p_start_y, p_end_x, p_end_y);
|
||||
|
||||
itkDebugMacro(<< "opj_set_decode_area() after");
|
||||
itkDebugMacro("opj_set_decode_area() after");
|
||||
|
||||
@@ -508,7 +467,6 @@ JPEG2000ImageIO::Read(void * buffer)
|
||||
opj_destroy_codec(this->m_Internal->m_Dinfo);
|
||||
|
@ -4,7 +4,7 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO InsightSoftwareConsortium/ITK
|
||||
REF "v${VERSION}"
|
||||
SHA512 48e38864d7cd20b4ff23cfca1a29b4cbf453ce842e037ca473ce5c7e9a5b1c0bf6b12e4c544c812bff2b4bb9feca409587175b6570929c9ac172cb4402d679da
|
||||
SHA512 3a98ececf258aac545f094dd3e97918c93cc82bc623ddf793c4bf0162ab06c83fbfd4d08130bdec6e617bda85dd17225488bc1394bc91b17f1232126a5d990db
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
double-conversion.patch
|
||||
@ -15,13 +15,12 @@ vcpkg_from_github(
|
||||
opencl.patch
|
||||
use-the-lrintf-intrinsic.patch
|
||||
dont-build-gtest.patch
|
||||
cxx17.patch # See https://github.com/InsightSoftwareConsortium/ITK/issues/4213#issuecomment-1722547712
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
"vtk" Module_ITKVtkGlue
|
||||
"cuda" Module_ITKCudaCommon # Requires RTK?
|
||||
"cuda" Module_CudaCommon # Requires RTK?
|
||||
#"cuda" CUDA_HAVE_GPU # Automatically set by FindCUDA?
|
||||
"cufftw" ITK_USE_CUFFTW
|
||||
"opencl" ITK_USE_GPU
|
||||
@ -35,7 +34,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
||||
if("cufftw" IN_LIST FEATURES)
|
||||
# Alternativly set CUFFT_LIB and CUFFTW_LIB
|
||||
if(WIN32)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
file(TO_CMAKE_PATH "$ENV{CUDA_PATH}" CUDA_PATH)
|
||||
set(CUDA_LIB_PATH "${CUDA_PATH}")
|
||||
|
||||
@ -117,6 +116,16 @@ if("opencv" IN_LIST FEATURES)
|
||||
-DModule_ITKVideoBridgeOpenCV:BOOL=ON
|
||||
)
|
||||
endif()
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
set(STATIC_CRT_LNK ON)
|
||||
else()
|
||||
set(STATIC_CRT_LNK OFF)
|
||||
endif()
|
||||
list(APPEND ADDITIONAL_OPTIONS
|
||||
-DITK_MSVC_STATIC_RUNTIME_LIBRARY=${STATIC_CRT_LNK}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(USE_64BITS_IDS OFF)
|
||||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL x64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
||||
@ -157,7 +166,6 @@ vcpkg_cmake_configure(
|
||||
#-DITK_USE_SYSTEM_VXL=ON
|
||||
#-DITK_USE_SYSTEM_CASTXML=ON # needs to be added to vcpkg_find_acquire_program https://data.kitware.com/api/v1/file/hashsum/sha512/b8b6f0aff11fe89ab2fcd1949cc75f2c2378a7bc408827a004396deb5ff5a9976bffe8a597f8db1b74c886ea39eb905e610dce8f5bd7586a4d6c196d7349da8d/download
|
||||
-DITK_USE_SYSTEM_MINC=ON
|
||||
-DITK_USE_SYSTEM_SWIG=ON
|
||||
-DITK_FORBID_DOWNLOADS=OFF # This should be turned on some day, however for now ITK does download specific versions so it shouldn't spontaneously break. Remote Modules would probably break with this!
|
||||
-DINSTALL_GTEST=OFF
|
||||
-DITK_USE_SYSTEM_GOOGLETEST=ON
|
||||
@ -183,6 +191,10 @@ vcpkg_cmake_configure(
|
||||
|
||||
OPTIONS_DEBUG ${OPTIONS_DEBUG}
|
||||
OPTIONS_RELEASE ${OPTIONS_RELEASE}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
DCMTK_USE_ICU # Used by DCMTK
|
||||
ITK_USE_SYSTEM_GOOGLETEST
|
||||
ITK_USE_SYSTEM_ICU # Used by DCMTK
|
||||
)
|
||||
if(BUILD_RTK) # Remote Modules are only downloaded on configure.
|
||||
# TODO: In the future try to download via vcpkg_from_github and move the files. That way patching does not need this workaround
|
||||
@ -200,14 +212,14 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/ITK-5.3/vcl_where_root_dir.h")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/ITK-5.4/vcl_where_root_dir.h")
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.3/itk_eigen.h" "include(${SOURCE_PATH}/CMake/UseITK.cmake)" "include(UseITK)")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.3/itk_eigen.h" "message(STATUS \"From ITK: Eigen3_DIR: ${CURRENT_INSTALLED_DIR}/share/eigen3\")" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.4/itk_eigen.h" "include(${SOURCE_PATH}/CMake/UseITK.cmake)" "include(UseITK)")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.4/itk_eigen.h" "message(STATUS \"From ITK: Eigen3_DIR: ${CURRENT_INSTALLED_DIR}/share/eigen3\")" "")
|
||||
|
||||
if("rtk" IN_LIST FEATURES)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.3/rtkConfiguration.h" "#define RTK_BINARY_DIR \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Modules/Remote/RTK\"" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.3/rtkConfiguration.h" "#define RTK_DATA_ROOT \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/ExternalData/Modules/Remote/RTK/test\"" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.4/rtkConfiguration.h" "#define RTK_BINARY_DIR \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Modules/Remote/RTK\"" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ITK-5.4/rtkConfiguration.h" "#define RTK_DATA_ROOT \"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/ExternalData/Modules/Remote/RTK/test\"" "")
|
||||
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/itk/Modules/RTK.cmake" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "\${ITK_INSTALL_PREFIX}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/itk/Modules/RTK.cmake" "${SOURCE_PATH}/Modules/Remote/RTK/utilities/lp_solve" "\${ITK_INSTALL_PREFIX}/include/RTK/lpsolve")
|
||||
|
@ -16,12 +16,17 @@ diff --git a/CMake/ITKModuleAPI.cmake b/CMake/ITKModuleAPI.cmake
|
||||
index af64d96dc..809335e6d 100644
|
||||
--- a/CMake/ITKModuleAPI.cmake
|
||||
+++ b/CMake/ITKModuleAPI.cmake
|
||||
@@ -133,7 +133,7 @@ macro(itk_module_config ns)
|
||||
@@ -133,11 +133,10 @@ macro(itk_module_config ns)
|
||||
endforeach()
|
||||
unset(_${ns}_USED_MODULES)
|
||||
|
||||
- foreach(v ${ns}_LIBRARIES ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS
|
||||
+ foreach(v ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS
|
||||
${ns}_RUNTIME_LIBRARY_DIRS ${ns}_FACTORY_NAMES ${ns}_FACTORY_LIST)
|
||||
if(${v})
|
||||
list(REMOVE_DUPLICATES ${v})
|
||||
foreach(
|
||||
v
|
||||
- ${ns}_LIBRARIES
|
||||
- ${ns}_INCLUDE_DIRS
|
||||
- ${ns}_LIBRARY_DIRS
|
||||
+ ${ns}_INCLUDE_DIRS
|
||||
+ ${ns}_LIBRARY_DIRS
|
||||
${ns}_RUNTIME_LIBRARY_DIRS
|
||||
${ns}_FACTORY_NAMES
|
||||
${ns}_FACTORY_LIST)
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "itk",
|
||||
"version-string": "5.3rc02",
|
||||
"port-version": 1,
|
||||
"version": "5.4.0",
|
||||
"description": "Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.",
|
||||
"homepage": "https://github.com/InsightSoftwareConsortium/ITK",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -2,12 +2,7 @@ diff --git a/Wrapping/TypedefMacros.cmake b/Wrapping/TypedefMacros.cmake
|
||||
index e6f8d0bf3..6c000dba8 100644
|
||||
--- a/Wrapping/TypedefMacros.cmake
|
||||
+++ b/Wrapping/TypedefMacros.cmake
|
||||
@@ -57,13 +57,12 @@ macro(itk_wrap_module library_name)
|
||||
|
||||
# WRAPPER_LIBRARY_DEPENDS. List of names of other wrapper libraries that
|
||||
# define symbols used by this wrapper library.
|
||||
INTERSECTION(WRAPPER_LIBRARY_DEPENDS "${ITK_MODULE_${library_name}_DEPENDS}" "${WRAP_ITK_MODULES}")
|
||||
# set(WRAPPER_LIBRARY_DEPENDS ${ITK_MODULE_${library_name}_DEPENDS})
|
||||
@@ -62,8 +62,7 @@ macro(itk_wrap_module library_name)
|
||||
|
||||
# WRAPPER_LIBRARY_LINK_LIBRARIES. List of other libraries that should
|
||||
# be linked to the wrapper library.
|
||||
|
@ -3725,8 +3725,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"itk": {
|
||||
"baseline": "5.3rc02",
|
||||
"port-version": 1
|
||||
"baseline": "5.4.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"itpp": {
|
||||
"baseline": "4.3.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2028e1d0573208111668ee936bd89fbd0beb2ab1",
|
||||
"version": "5.4.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "2ec3bd0c5abc15cb3a785a69fb4f68799182b3cb",
|
||||
"version-string": "5.3rc02",
|
||||
|
Loading…
x
Reference in New Issue
Block a user