2019-04-03 20:52:27 +08:00
if ( CMAKE_VERSION VERSION_GREATER_EQUAL 3.3 )
2019-04-05 06:22:03 +08:00
cmake_policy ( PUSH )
cmake_policy ( SET CMP0057 NEW )
2019-04-03 20:52:27 +08:00
if ( NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND "HDF5" IN_LIST ARGS )
# The caller hasn't said "CONFIG", so they want the built-in FindHDF5.cmake behavior. Set configurations macros to ensure the built-in script finds us.
if ( "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" )
set ( HDF5_USE_STATIC_LIBRARIES ON )
2019-06-09 05:08:59 +08:00
add_compile_definitions ( H5_BUILT_AS_STATIC_LIB )
2019-04-03 20:52:27 +08:00
else ( )
set ( HDF5_USE_STATIC_LIBRARIES OFF )
2019-06-09 05:08:59 +08:00
add_compile_definitions ( H5_BUILT_AS_DYNAMIC_LIB )
2019-04-03 20:52:27 +08:00
endif ( )
endif ( )
2019-04-05 06:22:03 +08:00
cmake_policy ( POP )
2019-04-03 20:52:27 +08:00
endif ( )
_find_package ( ${ ARGS } )