Skip to content
Snippets Groups Projects
Unverified Commit c4430e17 authored by Lars Bilke's avatar Lars Bilke Committed by GitHub
Browse files

Merge pull request #2762 from bilke/fix-hdf5-win

[Conan] Fixed hdf5 linking errors on MSVC 2019.
parents ddf4abbc 393b525b
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,9 @@ target_link_libraries(NetCdfDialogLib
${HDF5_HL_LIBRARIES}
${HDF5_LIBRARIES}
PRIVATE MathLib)
if(OGS_USE_CONAN AND MSVC)
target_link_libraries(NetCdfDialogLib PUBLIC ${CONAN_LIBS})
endif()
set_property(TARGET NetCdfDialogLib PROPERTY FOLDER "DataExplorer")
# Workaround for system installed VTK (tested on arch)
......
......@@ -47,4 +47,7 @@ if(TARGET NetCdfConverter)
${NETCDF_LIBRARIES_C}
${HDF5_HL_LIBRARIES}
${HDF5_LIBRARIES})
if(OGS_USE_CONAN AND MSVC)
target_link_libraries(NetCdfConverter ${CONAN_LIBS})
endif()
endif()
......@@ -110,7 +110,13 @@ if(OGS_USE_NETCDF)
set(NETCDF_ROOT ${CONAN_NETCDF-C_ROOT})
set(NETCDF_CXX_ROOT ${CONAN_NETCDF-CXX_ROOT})
find_package(NetCDF REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C HL)
if(OGS_USE_CONAN AND MSVC)
set(HDF5_DIR ${CONAN_HDF5_ROOT}/cmake/hdf5)
find_package(HDF5 REQUIRED COMPONENTS C HL NO_MODULE)
else()
find_package(HDF5 REQUIRED COMPONENTS C HL)
endif()
endif()
# lapack
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment