Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ macro(opm-grid_prereqs_hook)
target_compile_definitions(opmgrid PUBLIC HAVE_DUNE_ISTL=1)
endif()

if(TARGET duneuggrid)
target_link_libraries(opmgrid PUBLIC duneuggrid)
endif()

if(TARGET Zoltan::Zoltan)
target_link_libraries(opmgrid PUBLIC Zoltan::Zoltan)
target_compile_definitions(opmgrid PUBLIC HAVE_ZOLTAN=1)
Expand Down
5 changes: 5 additions & 0 deletions opm-grid-prereqs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ find_package(dune-grid REQUIRED)
# Use compile definitions to decide which packages are required.
if(TARGET opmgrid)
get_property(opm-grid_COMPILE_DEFINITIONS TARGET opmgrid PROPERTY INTERFACE_COMPILE_DEFINITIONS)
get_property(opm-grid_LIBS TARGET opmgrid PROPERTY INTERFACE_LINK_LIBRARIES)
if(opm-grid_COMPILE_DEFINITIONS MATCHES HAVE_MPI)
find_package(MPI REQUIRED)
endif()
Expand All @@ -18,9 +19,13 @@ if(TARGET opmgrid)
if(opm-grid_COMPILE_DEFINITIONS MATCHES HAVE_METIS)
find_package(METIS REQUIRED)
endif()
if(opm-grid_LIBS MATCHES duneuggrid)
find_package(dune-uggrid REQUIRED)
endif()
else()
# Used in the opm-grid build system. These are optional
# so no required flag here.
find_package(dune-uggrid)
find_package(MPI)
find_package(dune-istl)
find_package(ZOLTAN)
Expand Down