2020-09-05 22:19:43 +08:00
# highfive should be updated together with hdf5
2020-06-24 03:58:50 +08:00
vcpkg_from_github (
2019-03-15 05:29:33 +08:00
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
2021-05-07 04:52:01 +08:00
R E P O H D F G r o u p / h d f 5
2022-06-07 03:37:54 +08:00
R E F h d f 5 - 1 _ 1 2 _ 2
S H A 5 1 2 8 f 1 1 0 e 0 3 5 a 9 b d 5 b 0 7 6 8 7 b 3 0 f b 9 4 4 e d 7 2 e 5 b 6 a 6 e 0 e a 7 4 e e 6 5 0 2 5 0 f 4 0 f 0 d 4 f f 8 1 e 3 0 4 3 6 6 a 7 6 1 2 9 a 5 0 a 2 d 3 7 c 7 f 4 c 5 9 a 5 7 3 5 6 d 0 d 9 e e d 1 8 d b 6 c b 9 0 e 9 2 4 c 6 2 2 7 3 d 1 7 a 4
2020-06-24 03:58:50 +08:00
H E A D _ R E F d e v e l o p
2021-05-07 04:52:01 +08:00
P A T C H E S
2021-06-10 06:17:07 +08:00
h d f 5 _ c o n f i g . p a t c h
s z i p . p a t c h
p k g c o n f i g - r e q u i r e s . p a t c h
2021-07-07 04:34:41 +08:00
p k g c o n f i g - l i n k - o r d e r . p a t c h
2017-02-28 17:09:04 +08:00
)
2021-10-27 13:38:05 +08:00
set ( ALLOW_UNSUPPORTED OFF )
2020-01-07 06:13:34 +08:00
if ( "parallel" IN_LIST FEATURES AND "cpp" IN_LIST FEATURES )
2021-10-27 13:38:05 +08:00
message ( WARNING "Feature 'Parallel' and 'cpp' are mutually exclusive, enable feature ALLOW_UNSUPPORTED automatically to enable them both." )
set ( ALLOW_UNSUPPORTED ON )
endif ( )
if ( "threadsafe" IN_LIST FEATURES AND
( " p a r a l l e l " I N _ L I S T F E A T U R E S
O R " f o r t r a n " I N _ L I S T F E A T U R E S
O R " c p p " I N _ L I S T F E A T U R E S )
)
message ( WARNING "Feture 'threadsafe' and other features are mutually exclusive, enable feature ALLOW_UNSUPPORTED automatically to enable them both." )
set ( ALLOW_UNSUPPORTED ON )
2018-02-01 22:48:40 +08:00
endif ( )
2020-03-29 09:41:08 +08:00
if ( "fortran" IN_LIST FEATURE )
2021-10-27 13:38:05 +08:00
message ( WARNING "Feature 'fortran' is not yet official supported within VCPKG. Build will most likly fail if ninja 1.10 and a Fortran compiler are not available." )
2020-03-29 09:41:08 +08:00
endif ( )
2020-01-11 02:44:44 +08:00
vcpkg_check_features ( OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2021-06-10 06:17:07 +08:00
F E A T U R E S
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
t o o l s H D F 5 _ B U I L D _ T O O L S
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
f o r t r a n H D F 5 _ B U I L D _ F O R T R A N
t h r e a d s a f e H D F 5 _ E N A B L E _ T H R E A D S A F E
2021-10-27 13:38:05 +08:00
u t i l s H D F 5 _ B U I L D _ U T I L S
2020-01-11 02:44:44 +08:00
)
2021-05-07 04:52:01 +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
2022-06-07 03:37:54 +08:00
if ( "tools" IN_LIST FEATURES AND VCPKG_CRT_LINKAGE STREQUAL "static" )
2020-03-29 09:41:08 +08:00
list ( APPEND FEATURE_OPTIONS -DBUILD_STATIC_EXECS=ON )
endif ( )
2020-06-24 03:58:50 +08:00
if ( NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
list ( APPEND FEATURE_OPTIONS
- D B U I L D _ S T A T I C _ L I B S = O F F
- D O N L Y _ S H A R E D _ L I B S = O N )
endif ( )
2021-06-10 06:17:07 +08:00
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
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
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
2022-06-07 03:37:54 +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 / h d f 5
2020-06-24 03:58:50 +08:00
- D H D F _ P A C K A G E _ N A M E S P A C E : S T R I N G = h d f 5 : :
2021-10-27 13:38:05 +08:00
- D H D F 5 _ M S V C _ N A M I N G _ C O N V E N T I O N = O F F
- D S Z I P _ U S E _ E X T E R N A L = O N
- D A L L O W _ U N S U P P O R T E D = $ { A L L O W _ U N S U P P O R T E D }
O P T I O N S _ R E L E A S E
- D C M A K E _ D E B U G _ P O S T F I X = # For lib name in pkgconfig files
2017-01-11 19:18:49 +08:00
)
2021-06-10 06:17:07 +08:00
vcpkg_cmake_install ( )
2017-01-11 19:18:49 +08:00
vcpkg_copy_pdbs ( )
2021-06-10 06:17:07 +08:00
vcpkg_cmake_config_fixup ( )
2021-05-07 04:52:01 +08:00
set ( debug_suffix debug )
if ( VCPKG_TARGET_IS_WINDOWS )
set ( debug_suffix D )
endif ( )
2021-10-27 13:38:05 +08:00
2021-05-07 04:52:01 +08:00
vcpkg_fixup_pkgconfig ( )
2022-01-04 05:08:39 +08:00
if ( VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
file ( GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc" )
foreach ( file IN LISTS pc_files )
vcpkg_replace_string ( "${file}" " -lhdf5" " -llibhdf5" )
endforeach ( )
endif ( )
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 )
2021-10-27 13:38:05 +08:00
string ( REPLACE [[ ${ HDF5_PACKAGE_NAME } _TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin" ]]
[ [ $ { H D F 5 _ P A C K A G E _ N A M E } _ T O O L S _ D I R " $ { P A C K A G E _ P R E F I X _ D I R } / t o o l s / h d f 5 " ] ]
c o n t e n t s $ { c o n t e n t s }
)
2020-03-29 09:41:08 +08:00
file ( WRITE "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" ${ contents } )
2020-01-11 02:44:44 +08:00
2022-06-07 03:37:54 +08:00
if ( "tools" IN_LIST FEATURES )
2021-10-27 13:38:05 +08:00
set ( HDF5_TOOLS h5cc h5hlcc h5c++ h5hlc++ h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug
h 5 f o r m a t _ c o n v e r t h 5 j a m h 5 u n j a m h 5 l s h 5 m k g r p h 5 r e p a c k h 5 r e p a r t h 5 w a t c h p h 5 d i f f h 5 i m p o r t
)
2022-01-26 02:31:15 +08:00
2020-03-29 09:41:08 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" )
2021-10-27 13:38:05 +08:00
list ( TRANSFORM HDF5_TOOLS REPLACE "^(.+)$" "\\1-shared" )
2020-03-29 09:41:08 +08:00
else ( )
endif ( )
2022-01-26 02:31:15 +08:00
2021-10-27 13:38:05 +08:00
foreach ( HDF5_TOOL IN LISTS HDF5_TOOLS )
if ( NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${HDF5_TOOL}${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
O R N O T E X I S T S " $ { C U R R E N T _ P A C K A G E S _ D I R } / d e b u g / b i n / $ { H D F 5 _ T O O L } $ { V C P K G _ T A R G E T _ E X E C U T A B L E _ S U F F I X } " )
list ( REMOVE_ITEM HDF5_TOOLS "${HDF5_TOOL}" )
endif ( )
2020-03-29 09:41:08 +08:00
endforeach ( )
2022-01-26 02:31:15 +08:00
2022-06-07 03:37:54 +08:00
if ( "parallel" IN_LIST FEATURES )
list ( APPEND HDF5_TOOLS h5perf )
else ( )
list ( APPEND HDF5_TOOLS h5perf_serial )
endif ( )
2021-10-27 13:38:05 +08:00
vcpkg_copy_tools ( TOOL_NAMES ${ HDF5_TOOLS } AUTO_CLEAN )
endif ( )
if ( "utils" IN_LIST FEATURES )
vcpkg_copy_tools (
2022-01-26 02:31:15 +08:00
T O O L _ N A M E S m i r r o r _ s e r v e r m i r r o r _ s e r v e r _ s t o p
2021-10-27 13:38:05 +08:00
A U T O _ C L E A N
)
2020-03-29 09:41:08 +08:00
endif ( )
2021-10-27 13:38:05 +08:00
if ( VCPKG_LIBRARY_LINKAGE STREQUAL static )
2021-05-07 04:52:01 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" )
2020-03-29 09:41:08 +08:00
endif ( )
2020-01-11 02:44:44 +08:00
2021-10-27 13:38:05 +08:00
# Clean up
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
2021-05-07 04:52:01 +08:00
configure_file ( "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY )
2021-10-27 13:38:05 +08:00
file ( RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/data/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" )