Merge pull request #5574 from Neumann-A/VTK_8.2.0

[VTK 8.2.0/HDF5 1.10.5] Upgrade VTK and HDF5
This commit is contained in:
Phil Christensen 2019-03-14 23:12:31 -07:00 committed by GitHub
commit d72e38036b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 285 additions and 873 deletions

View File

@ -1,3 +1,3 @@
Source: flann
Version: 1.9.1-8
Version: 1.9.1-9
Description: Fast Library for Approximate Nearest Neighbors

View File

@ -1,41 +0,0 @@
diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
index cc58c90..49c53f0 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS)
set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
else()
- add_library(flann ${C_SOURCES})
+ add_library(flann SHARED ${C_SOURCES})
if(MINGW AND OPENMP_FOUND)
target_link_libraries(flann gomp)
@@ -111,12 +111,12 @@ endif()
endif(WIN32)
-#install (
-# TARGETS flann_cpp flann_cpp_s
-# RUNTIME DESTINATION bin
-# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
-# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
-#)
+install (
+ TARGETS flann_cpp flann_cpp_s
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
+)
if (BUILD_CUDA_LIB)
install (
@@ -129,7 +129,7 @@ endif()
if (BUILD_C_BINDINGS)
install (
- TARGETS flann
+ TARGETS flann flann_s
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}

View File

@ -1,41 +0,0 @@
diff --git "a/src/cpp/CMakeLists.txt" "b/src/cpp/CMakeLists.txt"
index 49c53f0..cc58c90 100644
--- "a/src/cpp/CMakeLists.txt"
+++ "b/src/cpp/CMakeLists.txt"
@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS)
set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
else()
- add_library(flann SHARED ${C_SOURCES})
+ add_library(flann ${C_SOURCES})
if(MINGW AND OPENMP_FOUND)
target_link_libraries(flann gomp)
@@ -111,12 +111,12 @@ endif()
endif(WIN32)
-install (
- TARGETS flann_cpp flann_cpp_s
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
- ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
-)
+#install (
+# TARGETS flann_cpp flann_cpp_s
+# RUNTIME DESTINATION bin
+# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
+# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
+#)
if (BUILD_CUDA_LIB)
install (
@@ -129,7 +129,7 @@ endif()
if (BUILD_C_BINDINGS)
install (
- TARGETS flann flann_s
+ TARGETS flann
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}

View File

@ -0,0 +1,22 @@
diff --git a/src/cpp/CMakeLists b/src/cpp/CMakeLists.txt
index e6c8ae06..c15a8e90 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -35,7 +35,7 @@ if (BUILD_CUDA_LIB)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
- add_library(flann_cpp SHARED "")
+ add_library(flann_cpp SHARED ${CPP_SOURCES})
set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)
@@ -90,7 +90,7 @@ if (BUILD_C_BINDINGS)
set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
- add_library(flann SHARED "")
+ add_library(flann SHARED ${C_SOURCES})
set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
else()

View File

@ -7,10 +7,9 @@ vcpkg_from_github(
SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7
HEAD_REF master
PATCHES
fix-install-flann.patch
Revert-fix-install-flann.patch
export-all-symbols-of-flann-cpp.patch
no-write-src-dir.patch
flann-linux.patch
)
vcpkg_configure_cmake(
@ -18,6 +17,7 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DBUILD_DOC=OFF
-DBUILD_PYTHON_BINDINGS=OFF
-DBUILD_MATLAB_BINDINGS=OFF

View File

@ -1,5 +1,5 @@
Source: hdf5
Version: 1.10.1-1
Version: 1.10.5-1
Description: HDF5 is a data model, library, and file format for storing and managing data
Build-Depends: zlib, szip

View File

@ -1,113 +0,0 @@
--- a/hl/src/CMakeLists.txt Thu Apr 13 18:26:10 2017
+++ b/hl/src/CMakeLists.txt Wed Jan 03 13:13:06 2018
@@ -29,16 +29,20 @@
${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h
)
-add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
-H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC)
-set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
- FOLDER libraries/hl
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
-set (install_targets ${HDF5_HL_LIB_TARGET})
+set (install_targets)
+
+if (NOT DISABLE_STATIC_LIBS)
+ add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
+ TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
+ target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC)
+ set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
+ FOLDER libraries/hl
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}")
+ set (install_targets ${HDF5_HL_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS})
@@ -73,8 +77,9 @@
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
+ else ()
+ INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries)
install (
TARGETS
--- a/src/CMakeLists.txt Thu Apr 13 18:26:11 2017
+++ b/src/CMakeLists.txt Wed Jan 03 13:03:05 2018
@@ -876,30 +876,33 @@
#-----------------------------------------------------------------------------
set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)
-add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS})
-if (NOT WIN32)
- target_link_libraries (${HDF5_LIB_TARGET} dl)
-endif ()
-if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
- target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
-endif ()
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
-H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC)
-set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
- FOLDER libraries
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-
-option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
-if (HDF5_ENABLE_DEBUG_APIS)
+set (install_targets)
+if (NOT DISABLE_STATIC_LIBS)
+ add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
+ TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ")
+ target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS})
+ if (NOT WIN32)
+ target_link_libraries (${HDF5_LIB_TARGET} dl)
+ endif ()
+ if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
+ target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
+ endif ()
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
- COMPILE_DEFINITIONS
- "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
+ FOLDER libraries
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+
+ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
+ if (HDF5_ENABLE_DEBUG_APIS)
+ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
+ COMPILE_DEFINITIONS
+ "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
+ )
+ endif ()
+ set (install_targets ${HDF5_LIB_TARGET})
endif ()
-set (install_targets ${HDF5_LIB_TARGET})
if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared")
@@ -975,8 +978,10 @@
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
+ else ()
+ INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
endif ()
- INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries)
+
install (
TARGETS

View File

@ -0,0 +1,28 @@
diff --git a/hdf5-config.cmake.in_old b/hdf5-config.cmake.in
index 3bd9e1dc..d95897d3 100644
--- a/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
+++ b/hdf5-1.10.5/config/cmake/hdf5-config.cmake.in
@@ -108,11 +108,19 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
# project which has already built hdf5 as a subproject
#-----------------------------------------------------------------------------
if (NOT TARGET "@HDF5_PACKAGE@")
- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND NOT TARGET "zlib")
+ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
+ #include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ else()
+ #find_package(@ZLIB_PACKAGE_NAME@ REQUIRED)
+ endif()
endif ()
- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND NOT TARGET "szip")
+ if(${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
+ include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
+ else()
+ find_package(@SZIP_PACKAGE_NAME@ REQUIRED)
+ endif()
endif ()
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()

View File

@ -1,27 +0,0 @@
--- a/src/CMakeLists.txt Wed Jan 03 13:16:33 2018
+++ b/src/CMakeLists.txt Wed Jan 03 13:16:56 2018
@@ -925,12 +925,12 @@
set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS})
+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_SHARED_LIBS})
if (NOT WIN32)
- target_link_libraries (${HDF5_LIBSH_TARGET} dl)
+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE dl)
endif ()
if (H5_HAVE_PARALLEL AND MPI_C_FOUND)
- target_link_libraries (${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${MPI_C_LIBRARIES})
endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
@@ -945,7 +945,7 @@
APPEND PROPERTY COMPILE_DEFINITIONS
"H5_HAVE_THREADSAFE"
)
- target_link_libraries (${HDF5_LIBSH_TARGET} Threads::Threads)
+ target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE Threads::Threads)
endif ()
if (HDF5_ENABLE_DEBUG_APIS)

View File

@ -3,23 +3,22 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.1/hdf5-1.10.1)
#set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.5/hdf5-1.10.5)
vcpkg_download_distfile(ARCHIVE
URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/CMake-hdf5-1.10.1.zip"
FILENAME "CMake-hdf5-1.10.1.zip"
SHA512 0045a6301c6e3479be70f025d8690297ff33b9e6e99ec217a33e9b916d9410fb3f7110b7361fbeaec163c35b8e6bd948ac8d5fdace80930c98c6a0b27c6fd5c4
URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/CMake-hdf5-1.10.5.tar.gz"
FILENAME "CMake-hdf5-1.10.5.tar.gz"
SHA512 a25ea28d7a511f9184d97b5b8cd4c6d52dcdcad2bffd670e24a1c9a6f98b03108014a853553fa2b00d4be7523128b5fd6a4454545e3b17ff8c66fea16a09e962
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF hdf5
PATCHES
${CMAKE_CURRENT_LIST_DIR}/use-szip-config.patch
${CMAKE_CURRENT_LIST_DIR}/disable-static-libs.patch
${CMAKE_CURRENT_LIST_DIR}/link-libraries-private.patch
hdf5_config.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_STATIC_LIBS)
set(SOURCE_PATH ${SOURCE_PATH}/hdf5-1.10.5)
if ("parallel" IN_LIST FEATURES)
set(ENABLE_PARALLEL ON)
@ -33,21 +32,24 @@ else()
set(ENABLE_CPP OFF)
endif()
#Note: HDF5 Builds by default static as well as shared libraries set BUILD_SHARED_LIBS to OFF to only get static libraries
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
-DDISABLE_STATIC_LIBS=${DISABLE_STATIC_LIBS}
-DHDF5_BUILD_EXAMPLES=OFF
-DHDF5_BUILD_TOOLS=OFF
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DHDF5_BUILD_CPP_LIB=${ENABLE_CPP}
-DHDF5_ENABLE_PARALLEL=${ENABLE_PARALLEL}
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON
-DHDF5_ENABLE_SZIP_SUPPORT=ON
-DHDF5_ENABLE_SZIP_ENCODING=ON
-DHDF5_INSTALL_DATA_DIR=share/hdf5/data
-DHDF5_INSTALL_CMAKE_DIR=share/hdf5
-DHDF5_INSTALL_CMAKE_DIR=share
)
vcpkg_install_cmake()
@ -57,11 +59,10 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_D
vcpkg_fixup_cmake_targets(CONFIG_PATH share/hdf5)
configure_file(
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
${CURRENT_PACKAGES_DIR}/share/hdf5
@ONLY
)
#Linux build create additional scripts here. I dont know what they are doing so I am deleting them and hope for the best
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -1,21 +0,0 @@
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index c2b81dc..a86d2d5 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -81,6 +81,16 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
if (NOT SZIP_USE_EXTERNAL)
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
+ find_package (SZIP CONFIG)
+ if (SZIP_FOUND)
+ if (TARGET szip-shared)
+ set(SZIP_LIBRARIES szip-shared)
+ else (TARGET szip-shared)
+ set(SZIP_LIBRARIES szip-static)
+ endif (TARGET szip-shared)
+ endif (SZIP_FOUND)
+ endif (NOT SZIP_FOUND)
+ if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
if (SZIP_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})

View File

@ -1,29 +0,0 @@
if (NOT PROJECT_NAME STREQUAL "VTK")
_find_package(${ARGS} CONFIG)
# Fill in missing static/shared targets
foreach(HDF5TARGET hdf5 hdf5_hl hdf5_cpp hdf5_hl_cpp)
if(TARGET hdf5::${HDF5TARGET}-static AND NOT TARGET hdf5::${HDF5TARGET}-shared)
_add_library(hdf5::${HDF5TARGET}-shared INTERFACE IMPORTED)
set_target_properties(hdf5::${HDF5TARGET}-shared PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-static")
elseif(TARGET hdf5::${HDF5TARGET}-shared AND NOT TARGET hdf5::${HDF5TARGET}-static)
_add_library(hdf5::${HDF5TARGET}-static INTERFACE IMPORTED)
set_target_properties(hdf5::${HDF5TARGET}-static PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-shared")
endif()
endforeach()
else ()
_find_package(${ARGS})
endif()
if("static" STREQUAL "static")
find_package(SZIP CONFIG REQUIRED)
foreach(HDF5TARGET hdf5 hdf5_hl hdf5_cpp hdf5_hl_cpp)
if(TARGET hdf5::${HDF5TARGET}-static)
if (TARGET szip-shared)
set_property(TARGET hdf5::${HDF5TARGET}-static APPEND PROPERTY INTERFACE_LINK_LIBRARIES szip-shared)
else ()
set_property(TARGET hdf5::${HDF5TARGET}-static APPEND PROPERTY INTERFACE_LINK_LIBRARIES szip-static)
endif ()
endif()
endforeach()
endif()

View File

@ -1,4 +1,4 @@
Source: highfive
Version: 1.5
Version: 1.5-1
Description: HighFive is a modern C++/C++11 friendly interface for libhdf5
Build-Depends: hdf5

View File

@ -8,6 +8,10 @@ vcpkg_from_github(
HEAD_REF master
)
if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static")
set(HDF5_USE_STATIC_LIBRARIES ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@ -16,6 +20,7 @@ vcpkg_configure_cmake(
-DHIGHFIVE_EXAMPLES=OFF
-DUSE_BOOST=OFF
-DHIGH_FIVE_DOCUMENTATION=OFF
-DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES}
)
vcpkg_install_cmake()
@ -23,6 +28,9 @@ vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/HighFive/CMake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
if(NOT WIN32)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/HighFive)
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright)

View File

@ -1,5 +1,5 @@
Source: kealib
Version: 1.4.7-1
Version: 1.4.11
Build-Depends: hdf5[cpp], zlib, szip
Description: kealib is gdal model using HDF5 standard.

View File

@ -1,122 +0,0 @@
diff --git a/trunk/CMakeLists.txt b/trunk/CMakeLists.txt
index 464fb13..dc8e26f 100644
--- a/trunk/CMakeLists.txt
+++ b/trunk/CMakeLists.txt
@@ -8,6 +8,7 @@
# which were derived from those used by libLAS (http://liblas.org/)
#
# History
+# 2018/01/25 - updated by Hiroshi Miura
# 2012/07/02 - Created by Peter Bunting
#
###############################################################################
@@ -50,13 +51,10 @@ endif()
option (BUILD_SHARED_LIBS "Build with shared library" ON)
-set(HDF5_INCLUDE_DIR /usr/local/include CACHE PATH "Include PATH for HDF5")
-set(HDF5_LIB_PATH /usr/local/lib CACHE PATH "Library PATH for HDF5")
set(GDAL_INCLUDE_DIR "NOTFOUND" CACHE PATH "Include PATH for GDAL")
set(GDAL_LIB_PATH "NOTFOUND" CACHE PATH "Library PATH for GDAL")
-set(HDF5_STATIC_LIBS FALSE CACHE BOOL "On Windows, link against static HDF5 libs")
IF(GDAL_INCLUDE_DIR AND GDAL_LIB_PATH)
# by default, only build if paths are set
@@ -65,6 +63,8 @@ ELSE()
set(LIBKEA_WITH_GDAL FALSE CACHE BOOL "Choose if .kea GDAL driver should be built")
ENDIF()
+find_package(hdf5 COMPONENTS CXX HL REQUIRED)
+link_libraries(hdf5::hdf5_cpp-shared)
###############################################################################
###############################################################################
@@ -141,14 +141,7 @@ endif(APPLE)
# Check the required libraries are present
if (MSVC)
- if(HDF5_STATIC_LIBS)
- set(HDF5_LIBRARIES -LIBPATH:"${HDF5_LIB_PATH}" hdf5_cpp.lib hdf5.lib zlibstatic.lib)
- else()
- set(HDF5_LIBRARIES -LIBPATH:"${HDF5_LIB_PATH}" hdf5_cpp.lib hdf5.lib)
- set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB)
- endif()
else()
- set(HDF5_LIBRARIES "-L${HDF5_LIB_PATH} -lhdf5 -lhdf5_hl -lhdf5_cpp")
endif(MSVC)
if (MSVC)
@@ -160,21 +153,19 @@ endif(MSVC)
###############################################################################
# Setup configure file
-configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${PROJECT_HEADER_DIR}/libkea/kea-config.h" )
-configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${PROJECT_BINARY_DIR}/kea-config" )
+configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}/libkea/kea-config.h" )
+configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${CMAKE_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" )
###############################################################################
###############################################################################
# Documentation
-file(READ "doc/index.txt" README )
-file(WRITE "README.txt" "${README}")
###############################################################################
###############################################################################
# Build library
include_directories ("${PROJECT_HEADER_DIR}")
-include_directories(${HDF5_INCLUDE_DIR})
+include_directories ("${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}")
add_subdirectory ("${PROJECT_SOURCE_DIR}")
if (LIBKEA_WITH_GDAL)
add_subdirectory ("${PROJECT_GDAL_DIR}")
@@ -185,13 +176,11 @@ endif(LIBKEA_WITH_GDAL)
# Tests
enable_testing()
add_test(NAME test1 COMMAND src/test1)
-
###############################################################################
###############################################################################
# Installation
-
-install (FILES "${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
###############################################################################
###############################################################################
diff --git a/trunk/src/CMakeLists.txt b/trunk/src/CMakeLists.txt
index 84456c4..b804e74 100644
--- a/trunk/src/CMakeLists.txt
+++ b/trunk/src/CMakeLists.txt
@@ -37,6 +37,7 @@ target_link_libraries(${LIBKEA_LIB_NAME} ${HDF5_LIBRARIES} )
###############################################################################
# Testing
+if(NOT DISABLE_TESTS)
# exe needs to be in 'src' otherwise it doesn't work
add_executable (test1 ${PROJECT_TEST_DIR}/test1.cpp)
target_link_libraries (test1 ${LIBKEA_LIB_NAME})
@@ -53,6 +54,7 @@ if(NOT WIN32)
# probably should match other compilers, but since this is a Conda
# specific hack I'm not going to bother
endif()
+endif()
###############################################################################
# Set target properties
@@ -67,6 +69,9 @@ PROPERTIES
###############################################################################
# Installation
-install (TARGETS ${LIBKEA_LIB_NAME} DESTINATION lib)
+install (TARGETS ${LIBKEA_LIB_NAME}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
install (FILES ${LIBKEA_H} DESTINATION include/libkea)
###############################################################################
\ No newline at end of file

View File

@ -0,0 +1,62 @@
index 1f4b1474..40a0f55d 100644
--- a/include/libkea/KEAAttributeTable.h
+++ b/include/libkea/KEAAttributeTable.h
@@ -37,7 +37,7 @@
#include <map>
#include <math.h>
-#include "H5Cpp.h"
+#include <H5Cpp.h>
#include "libkea/KEACommon.h"
#include "libkea/KEAException.h"
--- a/include/libkea/KEAAttributeTableFile.h
+++ b/include/libkea/KEAAttributeTableFile.h
@@ -35,7 +35,7 @@
#include <string>
#include <vector>
-#include "H5Cpp.h"
+#include <H5Cpp.h>
#include "libkea/KEACommon.h"
#include "libkea/KEAException.h"
--- a/include/libkea/KEACommon.h
+++ b/include/libkea/KEACommon.h
@@ -36,7 +36,7 @@
#include <string>
#include <vector>
-#include "H5Cpp.h"
+#include <H5Cpp.h>
// mark all exported classes/functions with DllExport to have
// them exported by Visual Studio
--- a/include/libkea/KEAAttributeTableInMem.h
+++ b/include/libkea/KEAAttributeTableInMem.h
@@ -35,7 +35,7 @@
#include <string>
#include <vector>
-#include "H5Cpp.h"
+#include <H5Cpp.h>
#include "libkea/KEACommon.h"
#include "libkea/KEAException.h"
--- a/include/libkea/KEAImageIO.h
+++ b/include/libkea/KEAImageIO.h
@@ -35,7 +35,7 @@
#include <string>
#include <vector>
-#include "H5Cpp.h"
+#include <H5Cpp.h>
#include "libkea/KEACommon.h"
#include "libkea/KEAException.h"

View File

@ -1,16 +1,16 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kealib-1.4.7)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kealib-1.4.11)
vcpkg_download_distfile(ARCHIVE
URLS "https://bitbucket.org/chchrsc/kealib/downloads/kealib-1.4.7.tar.gz"
FILENAME "kealib-1.4.7.tar.gz"
SHA512 2d58d7d08943d028e19a24f3ad3316a13b4db59be8697cebf30ee621e6bf0a6a47bf61abadd972d6ea7af1c8eed28bba7edf40fb8709fcccc1effbc90ae6e244
URLS "https://bitbucket.org/chchrsc/kealib/downloads/kealib-1.4.11.tar.gz"
FILENAME "kealib-1.4.11.tar.gz"
SHA512 e080dfd51111f85ddf8ab1bd71aaf7ec6cbe814db29ed62806362ef83718f777935347d9063cf29085f21bf09d4277fd88f5269af6555304130f50d093d28f63
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-cmake.patch
hdf5_include.patch
)
if ("parallel" IN_LIST FEATURES)
@ -19,20 +19,25 @@ else()
set(ENABLE_PARALLEL OFF)
endif()
if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static")
set(HDF5_USE_STATIC_LIBRARIES ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/trunk
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DHDF5_PREFER_PARALLEL=${ENABLE_PARALLEL}
-DLIBKEA_WITH_GDAL=OFF
-DDISABLE_TESTS=ON
-DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES}
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/trunk/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kealib RENAME copyright)
file(INSTALL ${SOURCE_PATH}/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kealib RENAME copyright)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)

View File

@ -31,11 +31,17 @@ target_link_libraries(libmatio PRIVATE ZLIB::ZLIB)
target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1)
find_package(hdf5 CONFIG REQUIRED)
target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared)
if(BUILD_SHARED_LIBS)
target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB)
if(HDF5_USE_STATIC_LIBRARIES)
target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static)
else()
target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared)
endif()
else()
target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_STATIC_LIB)
target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static)
endif()
install(

View File

@ -1,4 +1,4 @@
Source: matio
Version: 1.5.13
Version: 1.5.13-1
Description: MATLAB MAT File I/O Library
Build-Depends: zlib, hdf5

View File

@ -1,4 +1,4 @@
Source: netcdf-c
Version: 4.4.1.1-2
Version: 4.6.2
Build-Depends: hdf5, curl
Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb0bc26b..f1409fc6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -783,6 +783,7 @@ IF(ENABLE_DAP)
ADD_DEFINITIONS(-DCURL_STATICLIB=1)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
+ LINK_LIBRARIES(${CURL_LIBRARIES})
# Check to see if CURLOPT_USERNAME is defined.
# It is present starting version 7.19.1.

View File

@ -7,20 +7,21 @@
#
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/netcdf-c-4.4.1.1)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/netcdf-c-4.6.2)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/Unidata/netcdf-c/archive/v4.4.1.1.zip"
FILENAME "netcdf-c-v4.4.1.1.zip"
SHA512 8d31e47f0bd4d5c8640d3444c5c83425862ed1e8283aa78419e86b18d33fd93bfeb0067e8e9630457cb9c334d6fedf630283b5227a15137a3e153d57b22364a8
URLS "https://github.com/Unidata/netcdf-c/archive/v4.6.2.tar.gz"
FILENAME "netcdf-c-v4.6.2.tar.gz"
SHA512 7c7084e80cf2fb86cd05101f5be7b74797ee96bf49afadfae6ab32ceed6cd9a049bfa90175e7cc0742806bcd2f61156e33fe7930c7b646661d9c89be6b20dea3
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/no-install-deps.patch
${CMAKE_CURRENT_LIST_DIR}/config-pkg-location.patch
${CMAKE_CURRENT_LIST_DIR}/transitive-hdf5.patch
no-install-deps.patch
config-pkg-location.patch
transitive-hdf5.patch
fix_curl_linkage.patch
)
vcpkg_configure_cmake(

View File

@ -1,4 +1,4 @@
Source: netcdf-cxx4
Version: 4.3.0-1
Version: 4.3.0-2
Build-Depends: netcdf-c
Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

View File

@ -6,6 +6,10 @@
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static")
set(HDF5_USE_STATIC_LIBRARIES ON)
endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(STATUS "Warning: DLLs not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
@ -31,6 +35,7 @@ vcpkg_configure_cmake(
OPTIONS
-DNCXX_ENABLE_TESTS=OFF
-DCMAKE_INSTALL_CMAKECONFIGDIR=share/netCDFCxx
-DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES}
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
)

View File

@ -1,3 +1,3 @@
Source: qhull
Version: 7.2.1-2
Version: 7.2.1-3
Description: computes the convex hull, Delaunay triangulation, Voronoi diagram

View File

@ -7,7 +7,20 @@ vcpkg_from_github(
SHA512 8f5177ea45f82fa28f13e95105497e7e29086d7301e1cb8d3860fff09ebf8d0f01cfcb0f044c422f0ac0ba94b845bba223232e5eeb613bf671f65a569b8766d0
HEAD_REF master
)
if(${TARGET_TRIPLET} STREQUAL "x64-windows-static")
# workaround for visual studio toolset regression LNK1201 (remove if solved)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include
-DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull
-DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull
OPTIONS_RELEASE
-DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib
OPTIONS_DEBUG
-DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib
)
else()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@ -20,6 +33,7 @@ vcpkg_configure_cmake(
OPTIONS_DEBUG
-DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib
)
endif()
vcpkg_install_cmake()
@ -31,7 +45,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc)
file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull)
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
if(EXEFILES_RELEASE OR EXEFILES_DEBUG)
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)

View File

@ -1,3 +1,3 @@
Source: szip
Version: 2.1.1-1
Version: 2.1.1-3
Description: Szip compression software, providing lossless compression of scientific data

View File

@ -1,37 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4163a0..4e2a312 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -267,6 +267,14 @@ set (SZIP_VERSION_MAJOR ${SZIP_PACKAGE_VERSION_MAJOR})
set (SZIP_VERSION_MINOR ${SZIP_PACKAGE_VERSION_MINOR})
#-----------------------------------------------------------------------------
+# Set default component
+#-----------------------------------------------------------------------------
+set (SZIP_DEFAULT_COMPONENT static)
+if (BUILD_SHARED_LIBS)
+ set (SZIP_DEFAULT_COMPONENT shared)
+endif ()
+
+#-----------------------------------------------------------------------------
# Configure the szip-config.cmake file for the build directory
#-----------------------------------------------------------------------------
set(INCLUDE_INSTALL_DIR ${SZIP_INSTALL_INCLUDE_DIR} )
diff --git a/config/cmake/szip-config.cmake.in b/config/cmake/szip-config.cmake.in
index 4a7fec7..ad54287 100644
--- a/config/cmake/szip-config.cmake.in
+++ b/config/cmake/szip-config.cmake.in
@@ -37,10 +37,10 @@ if (NOT TARGET "@SZIP_PACKAGE@")
include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
endif ()
-# Handle default component(static) :
+# Handle default component(@SZIP_DEFAULT_COMPONENT@) :
if (NOT ${SZIP_PACKAGE_NAME}_FIND_COMPONENTS)
- set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS static)
- set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_static true)
+ set (${SZIP_PACKAGE_NAME}_FIND_COMPONENTS @SZIP_DEFAULT_COMPONENT@)
+ set (${SZIP_PACKAGE_NAME}_FIND_REQUIRED_@SZIP_DEFAULT_COMPONENT@ true)
endif ()
# Handle requested components:

View File

@ -1,50 +0,0 @@
--- a/src/CMakeLists.txt Fri Feb 03 20:42:43 2017
+++ b/src/CMakeLists.txt Wed Jan 03 11:42:51 2018
@@ -22,20 +22,22 @@
${SZIP_SRC_SOURCE_DIR}/szlib.h
)
-add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS})
-#set_target_properties (${SZIP_LIB_TARGET}
-# PROPERTIES
-# LINK_FLAGS "-version-info 2:0:0"
-#)
-TARGET_C_PROPERTIES (${SZIP_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${SZIP_LIB_TARGET} ${LINK_LIBS})
-set_target_properties(${SZIP_LIB_TARGET} PROPERTIES
- PUBLIC_HEADER "${SZIP_PUBLIC_HEADERS}"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-set_global_variable (SZIP_LIBRARIES_TO_EXPORT ${SZIP_LIB_TARGET})
-SZIP_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC)
-set (install_targets ${SZIP_LIB_TARGET})
+if (NOT BUILD_SHARED_LIBS)
+ add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS})
+ #set_target_properties (${SZIP_LIB_TARGET}
+ # PROPERTIES
+ # LINK_FLAGS "-version-info 2:0:0"
+ #)
+ TARGET_C_PROPERTIES (${SZIP_LIB_TARGET} STATIC " " " ")
+ target_link_libraries (${SZIP_LIB_TARGET} ${LINK_LIBS})
+ set_target_properties(${SZIP_LIB_TARGET} PROPERTIES
+ PUBLIC_HEADER "${SZIP_PUBLIC_HEADERS}"
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ set_global_variable (SZIP_LIBRARIES_TO_EXPORT ${SZIP_LIB_TARGET})
+ SZIP_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC)
+ set (install_targets ${SZIP_LIB_TARGET})
+endif()
if (BUILD_SHARED_LIBS)
add_library (${SZIP_LIBSH_TARGET} SHARED ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS})
@@ -62,8 +64,9 @@
if (SZIP_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${SZIP_LIBSH_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries)
+ else()
+ INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries)
endif (BUILD_SHARED_LIBS)
- INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries)
install (
TARGETS

View File

@ -1,19 +1,18 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/szip-2.1.1)
#set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/szip-2.1.1)
vcpkg_download_distfile(ARCHIVE
URLS "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz"
FILENAME "szip-2.1.1.tar.gz"
SHA512 ada6406efb096cd8a2daf8f9217fe9111a96dcae87e29d1c31f58ddd2ad2aa7bac03f23c7205dc9360f3b62d259461759330c7189ef0c2fe559704b1ea9d40dd
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF szip-2.1.1
PATCHES
${CMAKE_CURRENT_LIST_DIR}/disable-static-lib-in-shared-build.patch
${CMAKE_CURRENT_LIST_DIR}/default-component-shared.patch
${CMAKE_CURRENT_LIST_DIR}/fix-szip-config-to-set-szip-found.patch
fix-szip-config-to-set-szip-found.patch # This patch is required for linux on osx; It does not matter for windows
)
vcpkg_configure_cmake(

View File

@ -1,5 +1,5 @@
Source: vtk
Version: 8.1.0-7
Version: 8.2.0-1
Description: Software system for 3D computer graphics, image processing, and visualization
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora

View File

@ -1,31 +0,0 @@
find_package(HDF5 NO_MODULE REQUIRED)
set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
if(NOT TARGET vtk::hdf5::hdf5)
add_library(vtk::hdf5::hdf5 INTERFACE IMPORTED GLOBAL)
if(TARGET hdf5::hdf5-static)
set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-static")
elseif(TARGET hdf5::hdf5-shared)
set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-shared")
else()
message(FATAL_ERROR "could not find target hdf5-*")
endif()
endif()
if(NOT TARGET vtk::hdf5::hdf5_hl)
add_library(vtk::hdf5::hdf5_hl INTERFACE IMPORTED GLOBAL)
if(TARGET hdf5::hdf5_hl-static)
set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-static")
elseif(TARGET hdf5::hdf5_hl-shared)
set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-shared")
else()
message(FATAL_ERROR "could not find target hdf5_hl-*")
endif()
endif()
set(HDF5_LIBRARIES "$<BUILD_INTERFACE:vtk::hdf5::hdf5>" "$<BUILD_INTERFACE:vtk::hdf5::hdf5_hl>")
find_package_handle_standard_args(HDF5
REQUIRED_VARS HDF5_INCLUDE_DIRS HDF5_LIBRARIES
)

View File

@ -1,21 +0,0 @@
--- a/CMake/vtkModuleMacros.cmake Mon Jun 26 15:29:04 2017
+++ b/CMake/vtkModuleMacros.cmake Tue Aug 08 17:54:03 2017
@@ -893,18 +893,6 @@
set(vtk${_lower}_LIBRARIES "${${_upper_pkg_name}_LIBRARIES}")
endif()
- #a workaround for bad FindHDF5 behavior in which deb or opt can
- #end up empty. cmake >= 2.8.12.2 makes this unnecessary
- string(REGEX MATCH "debug;.*optimized;.*"
- _remove_deb_opt "${vtk${_lower}_LIBRARIES}")
- if (_remove_deb_opt)
- set(_tmp ${vtk${_lower}_LIBRARIES})
- list(REMOVE_ITEM _tmp "debug")
- list(REMOVE_ITEM _tmp "optimized")
- list(REMOVE_DUPLICATES _tmp)
- set(vtk${_lower}_LIBRARIES ${_tmp})
- endif()
-
set(vtk${_lower}_INCLUDE_DIRS "")
else()
if(_nolibs)

View File

@ -1,13 +0,0 @@
diff --git a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
index 0a19c41..0d92371 100644
--- a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
+++ b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in
@@ -110,7 +110,7 @@
#cmakedefine HAVE_LIBHDF5_HL
/* Define to `int' if system doesn't define. */
-#cmakedefine ssize_t @ssize_t@
+/* #cmakedefine ssize_t @ssize_t@ */
/* Define to `int' if system doesn't define. */
#cmakedefine ptrdiff_t @ptrdiff_t@

View File

@ -1,18 +0,0 @@
--- a/CMake/FindLibHaru.cmake Mon Jun 26 15:29:04 2017
+++ b/CMake/FindLibHaru.cmake Wed Aug 16 09:30:12 2017
@@ -19,9 +19,13 @@
find_path(LIBHARU_INCLUDE_DIR hpdf.h)
-find_library(LIBHARU_LIBRARY NAMES hpdf hpdfs)
+find_library(LIBHARU_LIBRARY_RELEASE NAMES hpdf libhpdf)
+find_library(LIBHARU_LIBRARY_DEBUG NAMES hpdfd libhpdfd)
-# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if
+include(SelectLibraryConfigurations)
+select_library_configurations(LIBHARU)
+
+# handle the QUIETLY and REQUIRED arguments and set LIBHARU_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibHaru DEFAULT_MSG

View File

@ -1,68 +0,0 @@
--- a/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:03:55 2017
+++ b/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:08:58 2017
@@ -11,7 +11,7 @@
file( TO_CMAKE_PATH "$ENV{LIBPROJ4_DIR}" _LIBPROJ4_DIR )
endif ()
- find_library( LIBPROJ4_LIBRARIES
+ find_library( LIBPROJ4_LIBRARY_RELEASE
NAMES proj
PATHS
${_LIBPROJ4_DIR}/lib64
@@ -24,7 +24,21 @@
${CMAKE_INSTALL_PREFIX}/lib
/usr/local/lib
/usr/lib
- NO_DEFAULT_PATH
+ )
+
+ find_library( LIBPROJ4_LIBRARY_DEBUG
+ NAMES projd
+ PATHS
+ ${_LIBPROJ4_DIR}/lib64
+ ${CMAKE_INSTALL_PREFIX}/lib64
+ /usr/local/lib64
+ /usr/lib64
+ ${_LIBPROJ4_DIR}
+ ${_LIBPROJ4_DIR}/lib
+ ${CMAKE_INSTALL_PREFIX}/bin
+ ${CMAKE_INSTALL_PREFIX}/lib
+ /usr/local/lib
+ /usr/lib
)
find_path( LIBPROJ4_INCLUDE_DIR
@@ -37,19 +51,22 @@
/usr/local/include
/usr/include
/usr/include/postgresql
- NO_DEFAULT_PATH
)
- if ( NOT LIBPROJ4_INCLUDE_DIR OR NOT LIBPROJ4_LIBRARIES )
- if ( LIBPROJ4_REQUIRED )
- message( FATAL_ERROR "LIBPROJ4 is required. Set LIBPROJ4_DIR" )
- endif ()
- else ()
- set( LIBPROJ4_FOUND 1 )
- mark_as_advanced( LIBPROJ4_FOUND )
- endif ()
+ include(SelectLibraryConfigurations)
+ select_library_configurations(LIBPROJ4)
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(LIBPROJ4
+ REQUIRED_VARS LIBPROJ4_LIBRARY LIBPROJ4_INCLUDE_DIR)
+
+ if(LIBPROJ4_FOUND)
+ set(LIBPROJ4_INCLUDE_DIRS ${LIBPROJ4_INCLUDE_DIR})
+ if(NOT LIBPROJ4_LIBRARIES)
+ set(LIBPROJ4_LIBRARIES ${LIBPROJ4_LIBRARY})
+ endif()
+ endif()
endif ()
-mark_as_advanced( FORCE LIBPROJ4_INCLUDE_DIR )
-mark_as_advanced( FORCE LIBPROJ4_LIBRARIES )
+mark_as_advanced(LIBPROJ4_INCLUDE_DIR)

View File

@ -1,10 +0,0 @@
--- a/CMake/FindMySQL.cmake Mon Jun 26 15:29:04 2017
+++ b/CMake/FindMySQL.cmake Wed Aug 16 11:21:58 2017
@@ -28,6 +28,7 @@
"C:/MySQL/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
+ PATH_SUFFIXES mysql
DOC "Specify the directory containing mysql.h."
)

View File

@ -1,11 +0,0 @@
--- a/CMake/FindODBC.cmake Mon Jun 26 15:29:04 2017
+++ b/CMake/FindODBC.cmake Wed Aug 16 12:58:11 2017
@@ -30,7 +30,7 @@
)
FIND_LIBRARY( ODBC_LIBRARY
- NAMES odbc iodbc unixodbc
+ NAMES odbc iodbc unixodbc odbc32
PATHS
/usr/lib
/usr/lib/odbc

View File

@ -0,0 +1,12 @@
diff --git a/IO/Movie/module.cmake b/IO/Movie/module.cmake
index 4275171..88204ad 100644
--- a/IO/Movie/module.cmake
+++ b/IO/Movie/module.cmake
@@ -14,6 +14,7 @@ vtk_module(vtkIOMovie
vtkIO
DEPENDS
${vtkIOMovie_vtkoggtheora}
+ vtkogg
vtkCommonExecutionModel
PRIVATE_DEPENDS
vtkCommonCore

View File

@ -4,7 +4,7 @@ endif()
include(vcpkg_common_functions)
set(VTK_SHORT_VERSION "8.1")
set(VTK_SHORT_VERSION "8.2")
set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0")
# =============================================================================
# Options:
@ -48,32 +48,12 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO "Kitware/VTK"
REF "v${VTK_LONG_VERSION}"
SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf
SHA512 fd1d9c2872baa6eca7f8105b0057b56ec554e9d5eaf25985302e7fc032bdce72255d79e3f5f16ca50504151bda49cb3a148272ba32e0f410b4bdb70959b8f3f4
HEAD_REF "master"
PATCHES
# Disable ssize_t because this can conflict with ssize_t that is defined on windows.
dont-define-ssize_t.patch
# We force CMake to use it's own version of the FindHDF5 module since newer versions
# shipped with CMake behave differently. E.g. the one shipped with CMake 3.9 always
# only finds the release libraries, but not the debug libraries.
# The file shipped with CMake allows us to set the libraries explicitly as it is done below.
# Maybe in the future we can disable the patch and use the new version shipped with CMake
# together with the hdf5-config.cmake that is written by HDF5 itself, but currently VTK
# disables taking the config into account explicitly.
use-fixed-find-hdf5.patch
# We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency
# will link to both, the debug and the release library.
disable-workaround-findhdf5.patch
fix-find-libproj4.patch
fix-find-libharu.patch
fix-find-mysql.patch
fix-find-odbc.patch
fix-find-lz4.patch
fix_ogg_linkage.patch
)
# Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK,
# since they do not detect the debug libraries correctly.
# The default files distributed with CMake (>= 3.9) should be superior by all means.
@ -82,7 +62,6 @@ vcpkg_from_github(
file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake)
file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindHDF5.cmake DESTINATION ${SOURCE_PATH}/CMake/NewCMake)
# =============================================================================
# Collect CMake options for optional components
@ -138,10 +117,16 @@ endif()
# =============================================================================
# Configure & Install
if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static")
set(HDF5_USE_STATIC_LIBRARIES ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES}
-DHAVE_SNPRINTF=ON
-DVTK_Group_Imaging=ON
-DVTK_Group_Views=ON
-DBUILD_TESTING=OFF
@ -153,12 +138,13 @@ vcpkg_configure_cmake(
-DVTK_USE_SYSTEM_GLEW=ON
-DVTK_USE_SYSTEM_HDF5=ON
-DVTK_USE_SYSTEM_JSONCPP=ON
-DVTK_USE_SYSTEM_LIBPROJ4=ON
-DVTK_USE_SYSTEM_LIBPROJ=ON
-DVTK_USE_SYSTEM_LIBXML2=ON
-DVTK_USE_SYSTEM_LZ4=ON
# -DVTK_USE_SYSTEM_NETCDF=ON
# -DVTK_USE_SYSTEM_NETCDFCPP=ON
-DVTK_USE_SYSTEM_OGGTHEORA=ON
-DVTK_USE_SYSTEM_OGG=ON
-DVTK_USE_SYSTEM_THEORA=ON
-DVTK_USE_SYSTEM_PNG=ON
-DVTK_USE_SYSTEM_TIFF=ON
-DVTK_USE_SYSTEM_ZLIB=ON
@ -196,119 +182,25 @@ if(VTK_WITH_ALL_MODULES)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}")
endif()
# For VTK `vcpkg_fixup_cmake_targets` is not enough:
# Files for system third party dependencies are written to modules that
# are located in the paths `share/vtk/Modules` and `debug/share/vtk/Modules`.
# In the release folder, only the release libraries are referenced (e.g. "C:/vcpkg/installed/x64-windows/lib/zlib.lib").
# But in the debug folder both libraries (e.g. "optimized;C:/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/vcpkg/installed/x64-windows/debug/lib/zlibd.lib")
# or only the debug library (e.g. "C:/vcpkg/installed/x64-windows/debug/lib/hdf5_D.lib") is referenced.
# This is because VCPKG appends only the release library prefix (.../x64-windows/lib)
# when configuring release but both (.../x64-windows/lib and .../x64-windows/debug/lib)
# when configuring debug.
# Now if we delete the debug/share/Modules folder and just leave share/Modules, a library
# that links to VTK will always use the release third party dependencies, even if
# debug VTK is used.
#
# The following code merges the libraries from both release and debug:
include(${CMAKE_CURRENT_LIST_DIR}/SplitLibraryConfigurations.cmake)
function(_vtk_combine_third_party_libraries MODULE_NAME)
set(MODULE_LIBRARIES_REGEX "set\\(${MODULE_NAME}_LIBRARIES \"([^\"]*)\"\\)")
# Read release libraries
file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" RELEASE_MODULE_CONTENT)
if("${RELEASE_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}")
set(RELEASE_LIBRARY_LIST "${CMAKE_MATCH_1}")
else()
message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}")
endif()
# Read debug libraries
file(READ "${CURRENT_PACKAGES_DIR}/debug/share/vtk/Modules/${MODULE_NAME}.cmake" DEBUG_MODULE_CONTENT)
if("${DEBUG_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}")
set(DEBUG_LIBRARY_LIST "${CMAKE_MATCH_1}")
else()
message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}")
endif()
split_library_configurations("${RELEASE_LIBRARY_LIST}" OPTIMIZED_RELEASE_LIBRARIES DEBUG_RELEASE_LIBRARIES GENERAL_RELEASE_LIBRARIES)
split_library_configurations("${DEBUG_LIBRARY_LIST}" OPTIMIZED_DEBUG_LIBRARIES DEBUG_DEBUG_LIBRARIES GENERAL_DEBUG_LIBRARIES)
# Combine libraries and wrap them in generator expressions
foreach(LIBRARY ${OPTIMIZED_RELEASE_LIBRARIES} ${GENERAL_RELEASE_LIBRARIES})
list(APPEND LIBRARY_LIST "$<$<NOT:$<CONFIG:Debug>>:${LIBRARY}>")
endforeach()
foreach(LIBRARY ${DEBUG_DEBUG_LIBRARIES} ${GENERAL_DEBUG_LIBRARIES})
list(APPEND LIBRARY_LIST "$<$<CONFIG:Debug>:${LIBRARY}>")
endforeach()
# Write combined libraries back
string(REGEX REPLACE "${MODULE_LIBRARIES_REGEX}"
"set(${MODULE_NAME}_LIBRARIES \"${LIBRARY_LIST}\")"
RELEASE_MODULE_CONTENT
"${RELEASE_MODULE_CONTENT}"
)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" "${RELEASE_MODULE_CONTENT}")
endfunction()
# IMPORTANT: Please make sure to extend this list whenever a new library is marked `USE_SYSTEM` in the configure step above!
set(SYSTEM_THIRD_PARTY_MODULES
vtkexpat
vtkfreetype
vtkjpeg
vtkglew
vtkhdf5
vtkjsoncpp
vtklibproj4
vtklibxml2
vtklz4
vtkoggtheora
vtkpng
vtktiff
vtkzlib
# vtkgl2ps
vtklibharu
)
if(VTK_WITH_PYTHON OR VTK_WITH_ALL_MODULES)
list(APPEND SYSTEM_THIRD_PARTY_MODULES
vtkPython
)
endif()
if(VTK_WITH_ALL_MODULES)
list(APPEND SYSTEM_THIRD_PARTY_MODULES
AutobahnPython
)
endif()
foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES)
_vtk_combine_third_party_libraries("${MODULE}")
endforeach()
# Remove all explicit references to vcpkg system libraries in the general VTKTargets.cmake file
# since these references always point to the release libraries, even in the debug case.
# The dependencies should be handled by the explicit modules we fixed above, so removing
# them here shouldn't cause any problems.
file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT)
string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
#file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT)
# Remove unset of _IMPORT_PREFIX in VTKTargets.cmake
STRING(REPLACE [[set(_IMPORT_PREFIX)]]
[[
#_IMPORT_PREFIX is required by vtkModules due to vcpkg_fixup_cmake_targets changing all cmake files (to use _IMPORT_PREFIX).
#STRING(REPLACE [[set(_IMPORT_PREFIX)]]
#[[
# VCPKG: The value of _IMPORT_PREFIX should not be unset.
#set(_IMPORT_PREFIX)
]]
VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
#]]
#VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
#file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
#file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT)
# Remove any remaining stray absolute references to the installed directory.
file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/*.cmake)
# Fix _IMPORT_PREFIX. It is not set within the Modules cmake (only set in VTKTargets.cmake).
# Since for VCPKG _IMPORT_PREFIX == VTK_INSTALL_PREFIX we just replace it with that.
file(GLOB_RECURSE CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/vtk/Modules/*.cmake)
foreach(FILE IN LISTS CMAKE_FILES)
file(READ "${FILE}" _contents)
string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}")
string(REPLACE "\${_IMPORT_PREFIX}" "\${VTK_INSTALL_PREFIX}" _contents "${_contents}")
file(WRITE "${FILE}" "${_contents}")
endforeach()

View File

@ -1,20 +0,0 @@
diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake
index 6d558e39b1..9511e9a1ad 100644
--- a/CMake/FindHDF5.cmake
+++ b/CMake/FindHDF5.cmake
@@ -3,11 +3,11 @@
# (BUG #0014363).
# include the default FindHDF5.cmake.
-if(CMAKE_VERSION VERSION_LESS 3.6.1)
+#if(CMAKE_VERSION VERSION_LESS 3.6.1)
include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake)
-else()
- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)
-endif()
+#else()
+# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)
+#endif()
if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL))
include(vtkMPI)

View File

@ -95,26 +95,27 @@ if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_I
message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.")
endif()
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths.
list(APPEND CMAKE_PREFIX_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
list(APPEND CMAKE_LIBRARY_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
)
list(APPEND CMAKE_FIND_ROOT_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
else() #Release build: Put Release paths before Debug paths. Debug Paths are required so that CMake generates correct info in autogenerated target files.
list(APPEND CMAKE_PREFIX_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
)
list(APPEND CMAKE_LIBRARY_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
)
list(APPEND CMAKE_FIND_ROOT_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
)
endif()
list(APPEND CMAKE_PREFIX_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
list(APPEND CMAKE_FIND_ROOT_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
list(APPEND CMAKE_LIBRARY_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
)
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
set(CMAKE_SYSTEM_IGNORE_PATH

View File

@ -36,17 +36,32 @@ function(vcpkg_test_cmake)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test)
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test)
#Generate Dummy source
# set(VCPKG_TEST_SOURCE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeIntegration.cpp)
# file(WRITE ${VCPKG_TEST_SOURCE} "int main() \{\n")
# file(APPEND ${VCPKG_TEST_SOURCE} "return 0;}")
# Generate test source CMakeLists.txt
set(VCPKG_TEST_CMAKELIST ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-test/CMakeLists.txt)
file(WRITE ${VCPKG_TEST_CMAKELIST} "cmake_minimum_required(VERSION 3.10)\n")
file(APPEND ${VCPKG_TEST_CMAKELIST} "set(CMAKE_PREFIX_PATH \"${CURRENT_PACKAGES_DIR};${CURRENT_INSTALLED_DIR}\")\n")
file(APPEND ${VCPKG_TEST_CMAKELIST} "\n")
file(APPEND ${VCPKG_TEST_CMAKELIST} "find_package(${_tc_PACKAGE_NAME} ${PACKAGE_TYPE} REQUIRED)\n")
#To properly test if the package is actually working haveway correctly we have to link all targets of a package to
#a test executable and than actually build it. This will not discover if every symbol exported by the library is available/linked
#but it will doscover if all files which are linked by a target actual exist. Problem is: How to discover all targets?
# file(APPEND ${VCPKG_TEST_CMAKELIST} "add_executable(${_tc_PACKAGE_NAME}_exe ${VCPKG_TEST_SOURCE})\n")
# file(APPEND ${VCPKG_TEST_CMAKELIST} "target_link_libraries(${_tc_PACKAGE_NAME}_exe PRIVATE ${_tc_PACKAGE_NAME})\n")
if(DEFINED _VCPKG_CMAKE_GENERATOR)
set(VCPKG_CMAKE_TEST_GENERATOR "${_VCPKG_CMAKE_GENERATOR}")
else()
set(VCPKG_CMAKE_TEST_GENERATOR Ninja)
endif()
# Run cmake config with a generated CMakeLists.txt
set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/test-cmake-${TARGET_TRIPLET}")
execute_process(
COMMAND ${CMAKE_COMMAND} .
COMMAND ${CMAKE_COMMAND} -G ${VCPKG_CMAKE_TEST_GENERATOR} .
OUTPUT_FILE "${LOGPREFIX}-out.log"
ERROR_FILE "${LOGPREFIX}-err.log"
RESULT_VARIABLE error_code