diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index 9d856a1263d80c6c09e73f06a79598f9685367bb..b44bd0d2e513efd29cd2f00ca58acac33c5fff8c 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -172,3 +172,7 @@ find_package(CVODE) if(CVODE_FOUND) add_definitions(-DCVODE_FOUND) endif() # CVODE_FOUND + +if(OGS_USE_MFRONT) + find_package(MGIS REQUIRED) +endif() diff --git a/scripts/cmake/FindMGIS.cmake b/scripts/cmake/FindMGIS.cmake new file mode 100644 index 0000000000000000000000000000000000000000..05d0e7d48aa7967c006466a1960f97042f4abc7f --- /dev/null +++ b/scripts/cmake/FindMGIS.cmake @@ -0,0 +1,16 @@ +# Find the MGIS includes and libraries +# +# MGIS_INCLUDE_DIR - Where to find MGIS headers +# MGIS_LIBRARY - The MGIS library to link against. +# MGIS_FOUND - Do not attempt to use if "no" or undefined. +# +# MGIS, the MFront Generic Interface Support library +# See https://github.com/thelfer/MFrontGenericInterfaceSupport +# http://tfel.sourceforge.net/generic-behaviours-interface.html + +find_path(MGIS_INCLUDE_DIR MGIS) + +find_library(MGIS_LIBRARY MFrontGenericInterface) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(MGIS DEFAULT_MSG MGIS_LIBRARY MGIS_INCLUDE_DIR)