message: Improves logic for loading mfem's CMake config in FindMFEM
diff: @@ -15,8 +15,22 @@ if (NOT MFEM_DIR)
  message(FATAL_ERROR "Cannot find MFEM. MFEM_DIR is not defined. ")
  endif()
  -if(EXISTS "${MFEM_DIR}/MFEMConfig.cmake")
  - include("${MFEM_DIR}/MFEMConfig.cmake")
  +# Using the CMake build system on Windows, and make-based system otherwise
  +set(_use_mfem_config FALSE)
  +if(WIN32)
  + set(_use_mfem_config TRUE)
  +endif()
  +
  +if(_use_mfem_config)
  + # Allow for several different configurations of MFEM
  + find_package(mfem CONFIG
  + REQUIRED
  + HINTS ${MFEM_DIR}/cmake/mfem
  + ${MFEM_DIR}/lib/cmake/mfem
  + ${MFEM_DIR}/share/cmake/mfem
  + ${MFEM_DIR}/share/mfem
  + ${MFEM_DIR}/mfem)
  +
  if(NOT MEFM_LIBRARY)
  set(MFEM_LIBRARY ${MFEM_LIBRARIES})
  endif()
  