From 253244c28d0808a3b73ba94700df6bf4482c2ea5 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 2 Mar 2022 15:22:00 +0300 Subject: [PATCH] bos #18709: Modify GMSH headers detection procedure --- cmake/FindGMSH.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmake/FindGMSH.cmake b/cmake/FindGMSH.cmake index c9a08bb..8e875ab 100644 --- a/cmake/FindGMSH.cmake +++ b/cmake/FindGMSH.cmake @@ -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) -- 2.39.2