diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index 6413386d71ca764d3c5b9251486a01e8afa1d0c4..ce48d92411a5249b67200b39a9361f755b5df669 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -53,17 +53,7 @@ target_link_libraries( ) if(OGS_USE_NETCDF) - target_link_libraries( - VtkVisFilter PUBLIC ${NETCDF_LIBRARIES_CXX} ${NETCDF_LIBRARIES_C} - ${HDF5_HL_LIBRARIES} ${HDF5_LIBRARIES} - ) - # Workaround for system installed VTK (tested on arch) - if(NOT OGS_USE_CONAN) - target_include_directories( - VtkVisFilter SYSTEM PUBLIC ${NETCDF_INCLUDES_C} - ${NETCDF_INCLUDES_CXX} - ) - endif() + target_link_libraries(VtkVisFilter PUBLIC netcdf-cxx4) add_autogen_include(VtkVisFilter) endif() diff --git a/Applications/Utils/FileConverter/CMakeLists.txt b/Applications/Utils/FileConverter/CMakeLists.txt index 1050fcbe834a06cb822a3ee88466d1261fc8114b..15a80eb11d7927a373fbc44f93a31314cc7b2533 100644 --- a/Applications/Utils/FileConverter/CMakeLists.txt +++ b/Applications/Utils/FileConverter/CMakeLists.txt @@ -36,8 +36,5 @@ if(TARGET ConvertSHPToGLI) endif() if(TARGET NetCdfConverter) - target_link_libraries( - NetCdfConverter ${NETCDF_LIBRARIES_CXX} ${NETCDF_LIBRARIES_C} - ${HDF5_HL_LIBRARIES} ${HDF5_LIBRARIES} - ) + target_link_libraries(NetCdfConverter netcdf-cxx4) endif() diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index 2c45df07e50101ddbb13c606a2a3f2befad5ed40..886db753017016d64329a6de0aafaf229553f972 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -23,7 +23,7 @@ target_link_libraries( if(OGS_USE_NETCDF) target_link_libraries( GeoLib - PRIVATE ${NETCDF_LIBRARIES_CXX} ${NETCDF_LIBRARIES_C} + PRIVATE netcdf-cxx4 ) target_compile_definitions(GeoLib PRIVATE OGS_USE_NETCDF) endif()