Skip to content
Snippets Groups Projects
Commit 393b525b authored by Lars Bilke's avatar Lars Bilke
Browse files

[Conan] Fixed hdf5 linking errors on MSVC 2019.

parent ddf4abbc
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,9 @@ target_link_libraries(NetCdfDialogLib ...@@ -10,6 +10,9 @@ target_link_libraries(NetCdfDialogLib
${HDF5_HL_LIBRARIES} ${HDF5_HL_LIBRARIES}
${HDF5_LIBRARIES} ${HDF5_LIBRARIES}
PRIVATE MathLib) PRIVATE MathLib)
if(OGS_USE_CONAN AND MSVC)
target_link_libraries(NetCdfDialogLib PUBLIC ${CONAN_LIBS})
endif()
set_property(TARGET NetCdfDialogLib PROPERTY FOLDER "DataExplorer") set_property(TARGET NetCdfDialogLib PROPERTY FOLDER "DataExplorer")
# Workaround for system installed VTK (tested on arch) # Workaround for system installed VTK (tested on arch)
......
...@@ -47,4 +47,7 @@ if(TARGET NetCdfConverter) ...@@ -47,4 +47,7 @@ if(TARGET NetCdfConverter)
${NETCDF_LIBRARIES_C} ${NETCDF_LIBRARIES_C}
${HDF5_HL_LIBRARIES} ${HDF5_HL_LIBRARIES}
${HDF5_LIBRARIES}) ${HDF5_LIBRARIES})
if(OGS_USE_CONAN AND MSVC)
target_link_libraries(NetCdfConverter ${CONAN_LIBS})
endif()
endif() endif()
...@@ -110,7 +110,13 @@ if(OGS_USE_NETCDF) ...@@ -110,7 +110,13 @@ if(OGS_USE_NETCDF)
set(NETCDF_ROOT ${CONAN_NETCDF-C_ROOT}) set(NETCDF_ROOT ${CONAN_NETCDF-C_ROOT})
set(NETCDF_CXX_ROOT ${CONAN_NETCDF-CXX_ROOT}) set(NETCDF_CXX_ROOT ${CONAN_NETCDF-CXX_ROOT})
find_package(NetCDF REQUIRED) 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() endif()
# lapack # 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