From ba6b9e7dafc5cbe721653a7ec9bfd1c873ab3012 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 22 Mar 2024 11:01:28 +0100 Subject: [PATCH] [bos #41189][Windows] Ensure that gmshd is picked if GMSHPLUGIN is built in debug mode --- cmake/FindGMSH.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/FindGMSH.cmake b/cmake/FindGMSH.cmake index 9c2698e..214b12b 100644 --- a/cmake/FindGMSH.cmake +++ b/cmake/FindGMSH.cmake @@ -42,7 +42,11 @@ 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 gmshd) +IF(WIN32 AND CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(GMSH_LIBRARIES NAMES gmshd) +ELSE() + FIND_LIBRARY(GMSH_LIBRARIES NAMES Gmsh gmsh gmshd) +ENDIF() INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMSH REQUIRED_VARS GMSH_INCLUDE_DIRS GMSH_LIBRARIES) -- 2.39.2