Skip to content

Commit

Permalink
fixes microsoft#5562 and matio regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Neumann-A committed Mar 6, 2019
1 parent d0222ef commit fdb5591
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ports/matio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit fdb5591

Please sign in to comment.