2020-01-07 06:13:34 +08:00
vcpkg_fail_port_install ( ON_TARGET "UWP" )
2017-11-27 02:28:16 +08:00
2017-01-11 19:18:49 +08:00
vcpkg_download_distfile ( ARCHIVE
2019-03-15 05:29:33 +08:00
U R L S " h t t p s : / / s u p p o r t . h d f g r o u p . o r g / f t p / H D F 5 / r e l e a s e s / h d f 5 - 1 . 1 0 / h d f 5 - 1 . 1 0 . 5 / s r c / C M a k e - h d f 5 - 1 . 1 0 . 5 . t a r . g z "
F I L E N A M E " C M a k e - h d f 5 - 1 . 1 0 . 5 . t a r . g z "
2019-04-03 11:35:44 +08:00
S H A 5 1 2 a 2 5 e a 2 8 d 7 a 5 1 1 f 9 1 8 4 d 9 7 b 5 b 8 c d 4 c 6 d 5 2 d c d c a d 2 b f f d 6 7 0 e 2 4 a 1 c 9 a 6 f 9 8 b 0 3 1 0 8 0 1 4 a 8 5 3 5 5 3 f a 2 b 0 0 d 4 b e 7 5 2 3 1 2 8 b 5 f d 6 a 4 4 5 4 5 4 5 e 3 b 1 7 f f 8 c 6 6 f e a 1 6 a 0 9 e 9 6 2
2017-01-11 19:18:49 +08:00
)
2019-03-15 05:29:33 +08:00
vcpkg_extract_source_archive_ex (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
A R C H I V E $ { A R C H I V E }
R E F h d f 5
2017-02-28 17:09:04 +08:00
P A T C H E S
2020-03-29 09:41:08 +08:00
h d f 5 _ c o n f i g . p a t c h
f i x - g e n e r a t e . p a t c h # removes the build of static targets in shared builds
s t a t i c - t a r g e t s . p a t c h # maps the internal static tagets to the shared targets if building as a dynamic library
e x p o r t - p r i v a t e . p a t c h # exports two additional functions in shared builds to make hl/tools/h5watch build in shared builds.
2017-02-28 17:09:04 +08:00
)
2020-01-07 06:13:34 +08:00
if ( "parallel" IN_LIST FEATURES AND "cpp" IN_LIST FEATURES )
message ( FATAL_ERROR "Feature Parallel and C++ options are mutually exclusive." )
2018-02-01 22:48:40 +08:00
endif ( )
2020-03-29 09:41:08 +08:00
if ( "fortran" IN_LIST FEATURE )
message ( WARNING "Fortran is not yet official supported within VCPKG. Build will most likly fail if ninja 1.10 and a Fortran compiler are not available." )
endif ( )
2020-01-11 02:44:44 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2020-03-29 09:41:08 +08:00
F E A T U R E S # <- Keyword FEATURES is required because INVERTED_FEATURES are being used
2020-01-11 02:44:44 +08:00
p a r a l l e l H D F 5 _ E N A B L E _ P A R A L L E L
2020-03-29 09:41:08 +08:00
t o o l s H D F 5 _ B U I L D _ T O O L S
2020-01-11 02:44:44 +08:00
c p p H D F 5 _ B U I L D _ C P P _ L I B
s z i p H D F 5 _ E N A B L E _ S Z I P _ S U P P O R T
s z i p H D F 5 _ E N A B L E _ S Z I P _ E N C O D I N G
z l i b H D F 5 _ E N A B L E _ Z _ L I B _ S U P P O R T
2020-03-29 09:41:08 +08:00
f o r t r a n H D F 5 _ B U I L D _ F O R T R A N
2020-01-11 02:44:44 +08:00
)
2019-10-08 01:35:13 +08:00
file ( REMOVE ${ SOURCE_PATH } /config/cmake_ext_mod/FindSZIP.cmake ) #Outdated; does not find debug szip
2020-03-29 09:41:08 +08:00
if ( FEATURES MATCHES "tools" AND VCPKG_CRT_LINKAGE STREQUAL "static" )
list ( APPEND FEATURE_OPTIONS -DBUILD_STATIC_EXECS=ON )
endif ( )
2020-01-11 02:44:44 +08:00
find_library ( SZIP_RELEASE NAMES libsz libszip szip sz PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
find_library ( SZIP_DEBUG NAMES libsz libszip szip sz libsz_D libszip_D szip_D sz_D szip_debug PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 10:11:54 +08:00
2017-01-11 19:18:49 +08:00
vcpkg_configure_cmake (
2019-10-08 01:35:13 +08:00
S O U R C E _ P A T H $ { S O U R C E _ P A T H } / h d f 5 - 1 . 1 0 . 5
2019-04-03 11:35:44 +08:00
D I S A B L E _ P A R A L L E L _ C O N F I G U R E
2017-02-09 15:15:27 +08:00
P R E F E R _ N I N J A
2020-01-11 02:44:44 +08:00
O P T I O N S
$ { F E A T U R E _ O P T I O N S }
2017-01-11 19:18:49 +08:00
- D B U I L D _ T E S T I N G = O F F
- D H D F 5 _ B U I L D _ E X A M P L E S = O F F
- D H D F 5 _ I N S T A L L _ D A T A _ D I R = s h a r e / h d f 5 / d a t a
2019-03-15 05:29:33 +08:00
- D H D F 5 _ I N S T A L L _ C M A K E _ D I R = s h a r e
2020-01-11 02:44:44 +08:00
" - D S Z I P _ L I B R A R Y _ D E B U G : P A T H = $ { S Z I P _ D E B U G } "
" - D S Z I P _ L I B R A R Y _ R E L E A S E : P A T H = $ { S Z I P _ R E L E A S E } "
2017-01-11 19:18:49 +08:00
)
vcpkg_install_cmake ( )
2020-03-29 09:41:08 +08:00
2017-01-11 19:18:49 +08:00
vcpkg_copy_pdbs ( )
[many ports] improvements for linux/wsl (#6730)
* [many ports] improve compatibility with WSL and mixed case filesystems
* [treehopper] express dependency on libusb, which was not working on non-win32 platforms and is still broken there
* [libharu] add compatibility with non-win32 platforms
* [geogram] fix openblas on linux
[clapack] better integration with linux environment
[visit-struct] put cmake config file in the expected folder
[geogram] remove trailing underscore to enable compatibility with OpenBLAS
* [openblas] playing with underscore, without success
* [openblas/lapack] fix library integration
* [clapack] improve target handling in cmake module
* [openblas] promote self-generated config to default cmake module, otherwise internal ones thinks wrongly that openblas can also solve lapack libs
* [clapack,openblas] improve libraries integration
* [many ports] fix cmake unnecessary target paths, wrong config paths, empty default dependencies, unnecessary [core] tags
* [suitesparse] improve integration with new lapack/openblas mechanism
* [suitesparse] add no underscore postfix also for linux
* [ceres] fix integration with newer openblas/lapack configs
* [aws-c-event-stream] fix regression
* [systemc] fix regression
* [libwebp,geogram] trigger rebuild
* [libwebp,pthread4w] fix regressions
* [glbinding] fix cmake module installation
* [globjects] disentangle unnecessary dependency from qt5
* [jasper] remove broken and unnecessary patches
* [libwebp] fix regression
* [many ports] avoid using BUILD_SHARED_LIBS which is uninitialized in port files
* [clapack] correctly find dlls
* [clapack] use a generic blas as dependency
* [fizz,g2o] restore expected version
* fix mistake
* [many ports] remove WIN32, APPLE and UNIX (again, they keep creeping in) from ports since they are broken and usually break non-win32 ports
* [libressl,openssl] do not try to build one if the other is already installed
* [itk] update ref and patch to avoid regression
* [libressl,openssl] implement full strategy to fix CI
* [libwebp] disable components that are broken on macOS
* [ogre] enable macOS build
* [freeimage,jxrlib,ogre,openexr,protobuf] port patches from #5169
* [ogre] add missing install command
* [ffmpeg] enable wrapper for cmake module
* [ffmpeg] add avresample module finder
* [ffmpeg] improve module detection and exported symbols
* [ffmpeg] add variables to cache
* [thrift] remove unnecessary build option
* [allegro5] fix shared/static inversion
* [protobuf] cleanup
* [libressl] cleanup
* [moos-core] cleanup
* commented features must not be separated from other features, otherwise vcpkg complains
* [itk] fix regression
* [shogun,itk] fix regressions
* [ogre] fix regression
* [opusfile] add compatibility with non-win32
* [itk] fix regression
* [sndfile,libsndfile] remove duplicate, redirect sndfile to libsndfile
* add missing dependencies
* [ismrmrd] fix regression
* [ffmpeg] trigger rebuild
* [clapack,openblas,libogg] fix regressions on macOS
* [libtins] fix regression
* force rebuild windows regressions, unable to reproduce locally
* [mosquitto] enable non-win32 builds
* [json-dto] force rebuild, unable to reproduce regression locally
* [many ports] uniform naming and path length requests
* fix regression
* fix regression
* [ffmpeg] fixes for downstream projects
* clean up - thanks to reviewers
* trigger rebuild of regressions on macOS
* trigger rebuild of regressions on macOS - part2
* Add core back
* Use VCPKG_CONCURRENCY
* Add core back to suitesparse
* Add core back to curl
* Add core back to magnum
* Add core back to magnum
* Add core back to magnum
* Add core back to cgal
2019-06-21 10:11:54 +08:00
vcpkg_fixup_cmake_targets ( )
2017-01-11 19:18:49 +08:00
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/share )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /debug/include )
2019-04-03 20:52:27 +08:00
2020-03-29 09:41:08 +08:00
file ( READ "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" contents )
string ( REPLACE [[ ${ HDF5_PACKAGE_NAME } _TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin" ]] [[ ${ HDF5_PACKAGE_NAME } _TOOLS_DIR "${PACKAGE_PREFIX_DIR}/tools/hdf5" ]] contents ${ contents } )
file ( WRITE "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" ${ contents } )
2020-01-11 02:44:44 +08:00
2020-03-29 09:41:08 +08:00
if ( FEATURES MATCHES "tools" )
set ( TOOLS h5cc h5hlcc h5c++ h5hlc++ h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug h5format_convert h5jam h5unjam h5ls h5mkgrp h5repack h5repart h5watch ph5diff h5import )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
set ( TOOL_SUFFIXES "-shared${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}" )
else ( )
set ( TOOL_SUFFIXES "-static${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}" )
endif ( )
foreach ( tool IN LISTS TOOLS )
foreach ( suffix IN LISTS TOOL_SUFFIXES )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}" )
file ( REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}" )
endif ( )
if ( EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" )
file ( INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}"
D E S T I N A T I O N " $ { C U R R E N T _ P A C K A G E S _ D I R } / t o o l s / $ { P O R T } " )
file ( REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" )
endif ( )
endforeach ( )
endforeach ( )
vcpkg_copy_tool_dependencies ( ${ CURRENT_PACKAGES_DIR } /tools/ ${ PORT } )
endif ( )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
file ( REMOVE_RECURSE ${ CURRENT_PACKAGES_DIR } /bin ${ CURRENT_PACKAGES_DIR } /debug/bin )
endif ( )
2020-01-11 02:44:44 +08:00
2020-03-29 09:41:08 +08:00
file ( RENAME ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } /data/COPYING ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } /copyright )
2020-01-07 06:13:34 +08:00
configure_file ( ${ CMAKE_CURRENT_LIST_DIR } /vcpkg-cmake-wrapper.cmake ${ CURRENT_PACKAGES_DIR } /share/ ${ PORT } /vcpkg-cmake-wrapper.cmake @ONLY )