mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 23:07:58 +08:00
ITK: Do not move/rename src folder. (#6367)
* removed src folder rename instead a warning is issued if the path is too long * Delete hdf5_config_mode_find_package.patch not used by portfile
This commit is contained in:
parent
04616db27e
commit
db47a79bd9
@ -1,5 +1,5 @@
|
||||
Source: itk
|
||||
Version: 4.13.0-906736bd-2
|
||||
Version: 4.13.0-906736bd-3
|
||||
Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis.
|
||||
Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[cpp], openjpeg
|
||||
|
||||
|
@ -1,68 +0,0 @@
|
||||
diff --git a/Modules/ThirdParty/HDF5/CMakeLists.txt b/Modules/ThirdParty/HDF5/CMakeLists.txt
|
||||
index 6caa63b..f118c73 100644
|
||||
--- a/Modules/ThirdParty/HDF5/CMakeLists.txt
|
||||
+++ b/Modules/ThirdParty/HDF5/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
project(ITKHDF5)
|
||||
set(ITKHDF5_THIRD_PARTY 1)
|
||||
|
||||
-if (BUILD_SHARED_LIBS)
|
||||
+if (ITK_BUILD_SHARED_LIBS)
|
||||
add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB=1)
|
||||
endif()
|
||||
if(ITK_USE_SYSTEM_HDF5)
|
||||
@@ -20,11 +20,10 @@ endif()
|
||||
")
|
||||
endif()
|
||||
|
||||
- set(ITKHDF5_LIBRARIES )
|
||||
- if(BUILD_SHARED_LIBS)
|
||||
- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_SHARED_LIBRARY} ${HDF5_CXX_SHARED_LIBRARY})
|
||||
+ if(ITK_BUILD_SHARED_LIBS)
|
||||
+ set(ITKHDF5_LIBRARIES hdf5::hdf5-shared hdf5::hdf5_cpp-shared)
|
||||
else()
|
||||
- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_STATIC_LIBRARY} ${HDF5_CXX_STATIC_LIBRARY})
|
||||
+ set(ITKHDF5_LIBRARIES hdf5::hdf5-static hdf5::hdf5_cpp-static)
|
||||
endif()
|
||||
|
||||
set(ITKHDF5_INCLUDE_DIRS
|
||||
@@ -33,11 +32,6 @@ endif()
|
||||
set(ITKHDF5_SYSTEM_INCLUDE_DIRS
|
||||
${HDF5_INCLUDE_DIR}
|
||||
${HDF5_INCLUDE_DIR_CPP}
|
||||
- ${HDF5_INCLUDE_DIRS}
|
||||
- ${HDF5_INCLUDE_DIR_CPP}
|
||||
- )
|
||||
- list(APPEND ITKHDF5_LIBRARIES
|
||||
- ${HDF5_LIBRARIES}
|
||||
)
|
||||
set(ITKHDF5_NO_SRC 1)
|
||||
else()
|
||||
@@ -45,7 +39,7 @@ else()
|
||||
${ITKHDF5_SOURCE_DIR}/src
|
||||
${ITKHDF5_BINARY_DIR}/src
|
||||
)
|
||||
- if(BUILD_SHARED_LIBS)
|
||||
+ if(ITK_BUILD_SHARED_LIBS)
|
||||
set(ITKHDF5_LIBRARIES hdf5_cpp-shared hdf5-shared)
|
||||
else()
|
||||
set(ITKHDF5_LIBRARIES hdf5_cpp-static hdf5-static)
|
||||
diff --git a/Modules/ThirdParty/HDF5/itk-module-init.cmake b/Modules/ThirdParty/HDF5/itk-module-init.cmake
|
||||
index a9207a8..e36c2d9 100644
|
||||
--- a/Modules/ThirdParty/HDF5/itk-module-init.cmake
|
||||
+++ b/Modules/ThirdParty/HDF5/itk-module-init.cmake
|
||||
@@ -2,12 +2,8 @@ option(ITK_USE_SYSTEM_HDF5 "Use an outside build of HDF5." ${ITK_USE_SYSTEM_LIBR
|
||||
mark_as_advanced(ITK_USE_SYSTEM_HDF5)
|
||||
if(ITK_USE_SYSTEM_HDF5)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
- find_package(HDF5 QUIET NO_MODULE COMPONENTS CXX C shared)
|
||||
+ find_package(HDF5 REQUIRED NO_MODULE COMPONENTS CXX C shared)
|
||||
else()
|
||||
- find_package(HDF5 QUIET NO_MODULE COMPONENTS CXX C static)
|
||||
- endif()
|
||||
-
|
||||
- if(NOT HDF5_FOUND)
|
||||
- find_package(HDF5 REQUIRED COMPONENTS CXX C)
|
||||
+ find_package(HDF5 REQUIRED NO_MODULE COMPONENTS CXX C static)
|
||||
endif()
|
||||
endif()
|
@ -1,5 +1,12 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
|
||||
if(BUILDTREES_PATH_LENGTH GREATER 50 AND CMAKE_HOST_WIN32)
|
||||
message(WARNING "ITKs buildsystem uses very long paths and may fail on your system.\n"
|
||||
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO InsightSoftwareConsortium/ITK
|
||||
@ -15,14 +22,6 @@ else()
|
||||
set(ITKVtkGlue OFF)
|
||||
endif()
|
||||
|
||||
# directory path length needs to be shorter than 50 characters
|
||||
set(ITK_BUILD_DIR ${CURRENT_BUILDTREES_DIR}/ITK)
|
||||
if(EXISTS ${ITK_BUILD_DIR})
|
||||
file(REMOVE_RECURSE ${ITK_BUILD_DIR})
|
||||
endif()
|
||||
file(RENAME ${SOURCE_PATH} ${ITK_BUILD_DIR})
|
||||
set(SOURCE_PATH "${ITK_BUILD_DIR}")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
|
Loading…
x
Reference in New Issue
Block a user