extend find_package(SMESH)

This commit is contained in:
looooo
2022-09-10 20:00:32 +02:00
committed by Uwe
parent fac841a0b7
commit 628e994f5a
2 changed files with 11 additions and 11 deletions

View File

@@ -10,9 +10,9 @@
find_package(VTK REQUIRED)
# If this definition is not set, linker errors will occur against SMESH on 64 bit machines.
if(CMAKE_SIZEOF_VOID_P STREQUAL 8)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DSALOME_USE_64BIT_IDS)
endif(CMAKE_SIZEOF_VOID_P STREQUAL 8)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
IF (CMAKE_COMPILER_IS_GNUCC)
FIND_PATH(SMESH_INCLUDE_DIR SMESH_Mesh.hxx

View File

@@ -1,10 +1,6 @@
macro(SetupSalomeSMESH)
# -------------------------------- Salome SMESH --------------------------
# Allow using external SMESH
if (FREECAD_USE_EXTERNAL_SMESH)
find_package(SMESH REQUIRED)
endif(FREECAD_USE_EXTERNAL_SMESH)
# Salome SMESH sources are under src/3rdParty now
if(BUILD_SMESH)
# set the internal smesh version:
@@ -123,13 +119,17 @@ macro(SetupSalomeSMESH)
else(NOT FREECAD_USE_EXTERNAL_SMESH)
find_package(SMESH CONFIG)
if(NOT SMESH_FOUND)
find_package(SMESH REQUIRED)
if(NOT SMESH_FOUND)
message(ERROR "================\n"
"SMESH not found.\n"
"================\n")
endif()
endif()
set (SMESH_INCLUDE_DIR ${SMESH_INCLUDE_PATH})
set(EXTERNAL_SMESH_LIBS ${SMESH_LIBRARIES})
if(NOT SMESH_FOUND)
message(ERROR "================\n"
"SMESH not found.\n"
"================\n")
endif()
include_directories(${SMESH_INCLUDE_DIR})
endif()