]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
bos #18709: Modify GMSH headers detection procedure V9_9_0a1
authorvsr <vsr@opencascade.com>
Wed, 2 Mar 2022 12:22:00 +0000 (15:22 +0300)
committervsr <vsr@opencascade.com>
Wed, 2 Mar 2022 12:22:00 +0000 (15:22 +0300)
cmake/FindGMSH.cmake

index c9a08bbc18934456458bf45bdc4a33c482a35be9..8e875abf0329d6f6b7fe252b4c179b53eeb2f5e1 100644 (file)
@@ -38,12 +38,9 @@ IF(GMSH_ROOT_DIR)
 ENDIF(GMSH_ROOT_DIR)
 
 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()
+IF(GMSH_INCLUDE_DIRS)
+  GET_FILENAME_COMPONENT(GMSH_INCLUDE_DIRS_UP ${GMSH_INCLUDE_DIRS} DIRECTORY)
+  LIST(APPEND GMSH_INCLUDE_DIRS "${GMSH_INCLUDE_DIRS_UP}")
 ENDIF()
 FIND_LIBRARY(GMSH_LIBRARIES NAMES Gmsh gmsh)