Salome HOME
MEDCoupling indispensable
[modules/smesh.git] / CMakeLists.txt
index f41109eb95f50cc45ceca9a141c6e6722ad06d16..cf1162252dbb7cf9e972cd936b32337e02a57434 100644 (file)
@@ -191,6 +191,15 @@ IF(NOT WITH_SHAPER_STUDY AND SALOME_BUILD_TESTS)
   MESSAGE(WARNING "SHAPERSTUDY is not found; the corresponding tests will be omitted")
 ENDIF()
 
+# Find MEDCoupling
+# ================
+SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool")
+IF(EXISTS ${MEDCOUPLING_ROOT_DIR})
+  FIND_PACKAGE(SalomeMEDCoupling REQUIRED)   # will reload HDF5, MEDFile, XDR, etc ...
+ELSE(EXISTS ${MEDCOUPLING_ROOT_DIR})
+  MESSAGE(FATAL_ERROR "We absolutely need the MEDCoupling tool, please define MEDCOUPLING_ROOT_DIR !")
+ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR})
+
 ##
 ## SMESH specifics
 ##