-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ITK 5.3.0 --------- Co-authored-by: Ray <[email protected]> Co-authored-by: Uilian Ries <[email protected]> * Add missing patch * Fix test v1 package Signed-off-by: Uilian Ries <[email protected]> * Simplify itk cmake dir Signed-off-by: Uilian Ries <[email protected]> --------- Signed-off-by: Uilian Ries <[email protected]> Co-authored-by: Ray <[email protected]> Co-authored-by: Uilian Ries <[email protected]>
- Loading branch information
1 parent
dee641b
commit 252118a
Showing
4 changed files
with
238 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
--- Modules/ThirdParty/Eigen3/itk-module-init.cmake | ||
+++ Modules/ThirdParty/Eigen3/itk-module-init.cmake | ||
@@ -1,3 +1,3 @@ | ||
if(ITK_USE_SYSTEM_EIGEN) | ||
- find_package(Eigen3 REQUIRED CONFIG) | ||
+ find_package(Eigen3 REQUIRED) | ||
endif() | ||
--- Modules/ThirdParty/DCMTK/itk-module-init.cmake | ||
+++ Modules/ThirdParty/DCMTK/itk-module-init.cmake | ||
@@ -24,7 +24,7 @@ | ||
if(ITK_USE_SYSTEM_DCMTK) | ||
# Use local FindDCMTK.cmake. | ||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/CMake") | ||
- find_package(DCMTK REQUIRED NO_MODULE) | ||
+ find_package(DCMTK REQUIRED) | ||
else(ITK_USE_SYSTEM_DCMTK) | ||
# Copied and mofified from DCMTK/CMake/3rdparty.cmake | ||
if(NOT DEFINED DCMTK_USE_ICU) | ||
--- Modules/ThirdParty/Eigen3/CMakeLists.txt | ||
+++ Modules/ThirdParty/Eigen3/CMakeLists.txt | ||
@@ -52,9 +52,9 @@ | ||
|
||
if(ITK_USE_SYSTEM_EIGEN) | ||
set(_Eigen3_SYSTEM_OR_INTERNAL "Eigen3") | ||
- find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) | ||
- set(Eigen3_DIR_INSTALL ${Eigen3_DIR}) | ||
- set(Eigen3_DIR_BUILD ${Eigen3_DIR}) | ||
+ find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) | ||
+ set(Eigen3_DIR_INSTALL ${Eigen3_INCLUDE_DIR}) | ||
+ set(Eigen3_DIR_BUILD ${Eigen3_INCLUDE_DIR}) | ||
else() | ||
set(_Eigen3_SYSTEM_OR_INTERNAL "ITKInternalEigen3") | ||
find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) | ||
@@ -66,7 +66,7 @@ | ||
# Eigen3 is header only, but there are compile definitions that we want to provide | ||
# to enforce use of MPL only code, and to disable warnings. | ||
# We only need to add the location of the header itk_eigen.h used internally. | ||
-get_target_property(Eigen_INCLUDE_DIRS ${_eigen_itk_target} INTERFACE_INCLUDE_DIRECTORIES) | ||
+set(Eigen_INCLUDE_DIRS ${Eigen3_INCLUDE_DIRS}) | ||
set(ITKEigen3_INCLUDE_DIRS | ||
${Eigen_INCLUDE_DIRS} | ||
${ITKEigen3_BINARY_DIR}/src # For the generated itk_eigen.h | ||
@@ -75,14 +75,10 @@ | ||
# When this module is loaded by an app, load Eigen too. | ||
# Load ITKInternalEigen3 or Eigen3 depending on ITK_USE_SYSTEM_EIGEN | ||
set(ITKEigen3_EXPORT_CODE_INSTALL " | ||
-set(ITK_USE_SYSTEM_EIGEN \"${ITK_USE_SYSTEM_EIGEN}\") | ||
-set(${_Eigen3_SYSTEM_OR_INTERNAL}_DIR \"${Eigen3_DIR_INSTALL}\") | ||
-find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) | ||
+find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) | ||
") | ||
set(ITKEigen3_EXPORT_CODE_BUILD " | ||
-set(ITK_USE_SYSTEM_EIGEN \"${ITK_USE_SYSTEM_EIGEN}\") | ||
-set(${_Eigen3_SYSTEM_OR_INTERNAL}_DIR \"${Eigen3_DIR_BUILD}\") | ||
-find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) | ||
+find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) | ||
") | ||
|
||
# Eigen3 targets are not installed if ITK_USE_SYSTEM_EIGEN==True | ||
--- Modules/ThirdParty/Eigen3/src/itk_eigen.h.in | ||
+++ Modules/ThirdParty/Eigen3/src/itk_eigen.h.in | ||
@@ -43,10 +43,10 @@ | ||
set(Eigen3_DIR ${ITKInternalEigen3_DIR}) | ||
endif() | ||
message(STATUS "From ITK: Eigen3_DIR: ${Eigen3_DIR}") | ||
-find_package(Eigen3 REQUIRED CONFIG) | ||
+find_package(Eigen3 REQUIRED) | ||
add_executable(main main.cpp) | ||
target_link_libraries(main PUBLIC ${ITK_LIBRARIES}) | ||
target_link_libraries(main PUBLIC Eigen3::Eigen) | ||
\endcode | ||
* | ||
* Then, the user can use Eigen3 as usual: | ||
--- Modules/ThirdParty/JPEG/CMakeLists.txt | ||
+++ Modules/ThirdParty/JPEG/CMakeLists.txt | ||
@@ -6,13 +6,13 @@ | ||
|
||
if(ITK_USE_SYSTEM_JPEG) | ||
find_package(JPEG REQUIRED) | ||
set(ITKJPEG_INCLUDE_DIRS | ||
${ITKJPEG_BINARY_DIR}/src | ||
) | ||
set(ITKJPEG_SYSTEM_INCLUDE_DIRS | ||
${JPEG_INCLUDE_DIR} | ||
) | ||
- set(ITKJPEG_LIBRARIES "${JPEG_LIBRARIES}") | ||
+ set(ITKJPEG_LIBRARIES JPEG::JPEG) | ||
set(ITKJPEG_NO_SRC 1) | ||
else() | ||
set(ITKJPEG_INCLUDE_DIRS | ||
--- Modules/ThirdParty/DoubleConversion/CMakeLists.txt | ||
+++ Modules/ThirdParty/DoubleConversion/CMakeLists.txt | ||
@@ -8,8 +8,8 @@ | ||
|
||
if(ITK_USE_SYSTEM_DOUBLECONVERSION) | ||
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) | ||
+ set(ITKDoubleConversion_INCLUDE_DIRS ${double-conversion_INCLUDE_DIRS}) | ||
+ set(ITKDoubleConversion_LIBRARIES ${double-conversion_LIBRARIES}) | ||
else() | ||
set(ITKDoubleConversion_INCLUDE_DIRS | ||
${ITKDoubleConversion_SOURCE_DIR}/src | ||
--- Modules/ThirdParty/Expat/CMakeLists.txt | ||
+++ Modules/ThirdParty/Expat/CMakeLists.txt | ||
@@ -6,9 +6,9 @@ | ||
|
||
if(ITK_USE_SYSTEM_EXPAT) | ||
find_package(EXPAT REQUIRED) | ||
- set(ITKExpat_INCLUDE_DIRS ${ITKExpat_BINARY_DIR}/src ) | ||
- set(ITKExpat_SYSTEM_INCLUDE_DIRS "${EXPAT_INCLUDE_DIR}") | ||
- set(ITKExpat_LIBRARIES "${EXPAT_LIBRARY}") | ||
+ set(ITKExpat_INCLUDE_DIRS ${EXPAT_INCLUDE_DIRECTORIES}) | ||
+ set(ITKExpat_SYSTEM_INCLUDE_DIRS ${EXPAT_INCLUDE_DIRECTORIES}) | ||
+ set(ITKExpat_LIBRARIES EXPAT::EXPAT) | ||
set(ITKExpat_NO_SRC 1) | ||
else() | ||
set(ITKExpat_INCLUDE_DIRS | ||
--- Modules/ThirdParty/HDF5/CMakeLists.txt | ||
+++ Modules/ThirdParty/HDF5/CMakeLists.txt | ||
@@ -19,25 +19,9 @@ if(CMAKE_LINKER MATCHES "link.exe$") | ||
endif() | ||
|
||
if(ITK_USE_SYSTEM_HDF5) | ||
- | ||
- if(HDF5_DIR) | ||
- set(_HDF5_DIR_CODE "set(HDF5_DIR \"${HDF5_DIR}\")") | ||
- endif() | ||
- if(HDF5_NO_MODULE) | ||
- set(_HDF5_NO_MODULE_ARG "NO_MODULE") | ||
- endif() | ||
- | ||
- # When ITK's config is loaded, load HDF5 too. | ||
- set(ITKHDF5_EXPORT_CODE_INSTALL " | ||
-${_HDF5_DIR_CODE} | ||
-find_package(HDF5 ${_HDF5_NO_MODULE_ARG} REQUIRED COMPONENTS CXX C HL) | ||
-") | ||
- set(ITKHDF5_EXPORT_CODE_BUILD " | ||
-if(NOT ITK_BINARY_DIR) | ||
- ${_HDF5_DIR_CODE} | ||
- find_package(HDF5 ${_HDF5_NO_MODULE_ARG} REQUIRED COMPONENTS CXX C HL) | ||
-endif() | ||
-") | ||
+ find_package(HDF5 REQUIRED) | ||
+ set(HDF5_C_SHARED_LIBRARY HDF5::HDF5) | ||
+ set(HDF5_C_STATIC_LIBRARY HDF5::HDF5) | ||
|
||
if(BUILD_SHARED_LIBS) | ||
if (TARGET hdf5-shared) | ||
--- Modules/ThirdParty/OpenJPEG/src/CMakeLists.txt | ||
+++ Modules/ThirdParty/OpenJPEG/src/CMakeLists.txt | ||
@@ -4,5 +4,8 @@ | ||
set(ITK3P_INSTALL_RUNTIME_DIR "${ITKOpenJPEG_INSTALL_RUNTIME_DIR}") | ||
set(ITK3P_INSTALL_LIBRARY_DIR "${ITKOpenJPEG_INSTALL_LIBRARY_DIR}") | ||
set(ITK3P_INSTALL_ARCHIVE_DIR "${ITKOpenJPEG_INSTALL_ARCHIVE_DIR}") | ||
-add_subdirectory(openjpeg) | ||
-itk_module_target(itkopenjpeg NO_INSTALL) | ||
+find_package(OpenJPEG REQUIRED) | ||
+add_library(itkopenjpeg INTERFACE) | ||
+set_property(TARGET itkopenjpeg PROPERTY INTERFACE_LINK_LIBRARIES openjp2) | ||
+#target_compile_definitions(itkopenjpeg INTERFACE) | ||
+install(TARGETS itkopenjpeg EXPORT ${ITK3P_INSTALL_EXPORT_NAME}) | ||
--- Modules/ThirdParty/TBB/CMakeLists.txt | ||
+++ Modules/ThirdParty/TBB/CMakeLists.txt | ||
@@ -8,14 +8,14 @@ set(ITKTBB_NO_SRC 1) | ||
# When this module is loaded by an app, load TBB too. | ||
set(ITKTBB_EXPORT_CODE_INSTALL " | ||
set(TBB_DIR \"${TBB_DIR}\") | ||
-find_package(TBB REQUIRED CONFIG) | ||
+find_package(TBB REQUIRED) | ||
") | ||
|
||
# When this module is configured by an app, configure TBB too. | ||
set(ITKTBB_EXPORT_CODE_BUILD " | ||
if(NOT ITK_BINARY_DIR) | ||
set(TBB_DIR \"${TBB_DIR}\") | ||
- find_package(TBB REQUIRED CONFIG) | ||
+ find_package(TBB REQUIRED) | ||
endif() | ||
") | ||
|
||
diff --git a/Modules/ThirdParty/TBB/itk-module-init.cmake b/Modules/ThirdParty/TBB/itk-module-init.cmake | ||
index 1b7ee20a..0859ef33 100644 | ||
--- a/Modules/ThirdParty/TBB/itk-module-init.cmake | ||
+++ b/Modules/ThirdParty/TBB/itk-module-init.cmake | ||
@@ -1,2 +1,2 @@ | ||
-find_package(TBB REQUIRED CONFIG) # must have TBBConfig.cmake, provided since version tbb2017_20170604oss | ||
+find_package(TBB REQUIRED) | ||
get_target_property(TBB_INCLUDE_DIRS TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"5.3.0": | ||
folder: "all" | ||
"5.1.2": | ||
folder: "all" | ||
"5.1.0": | ||
|