From: vsr Date: Fri, 17 Sep 2021 08:10:11 +0000 (+0300) Subject: bos #26360 Adapt detection procedure for GMSH 4.8.4 X-Git-Tag: V9_8_0a1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11fad7972a407955bf4bbc4954a5c2d998098e18;p=tools%2Fconfiguration.git bos #26360 Adapt detection procedure for GMSH 4.8.4 --- diff --git a/cmake/FindGMSH.cmake b/cmake/FindGMSH.cmake index e610afa..c9a08bb 100644 --- a/cmake/FindGMSH.cmake +++ b/cmake/FindGMSH.cmake @@ -37,7 +37,14 @@ IF(GMSH_ROOT_DIR) LIST(APPEND CMAKE_PREFIX_PATH "${GMSH_ROOT_DIR}") ENDIF(GMSH_ROOT_DIR) -FIND_PATH(GMSH_INCLUDE_DIRS Gmsh.h gmsh.h PATH_SUFFIXES gmsh) +FIND_PATH(GMSH_INCLUDE_DIRS NAMES GmshVersion.h PATH_SUFFIXES gmsh) +FIND_PATH(GMSH_INCLUDE_DIRS_EXTRA NAMES Gmsh.h gmsh.h PATH_SUFFIXES gmsh) +IF(GMSH_INCLUDE_DIRS AND GMSH_INCLUDE_DIRS_EXTRA) + IF(NOT ${GMSH_INCLUDE_DIRS} STREQUAL ${GMSH_INCLUDE_DIRS_EXTRA}) + # gmsh stupidity: gmsh.h/Gmsh.h and GmshVersion.h may be in the same folder or in different ones! + LIST(APPEND GMSH_INCLUDE_DIRS "${GMSH_INCLUDE_DIRS_EXTRA}") + ENDIF() +ENDIF() FIND_LIBRARY(GMSH_LIBRARIES NAMES Gmsh gmsh) INCLUDE(FindPackageHandleStandardArgs)