extend find_package(SMESH)

This commit is contained in:
looooo
2022-10-22 01:27:28 +02:00
committed by Uwe
parent dbeb4d2f5d
commit 5da8804871
2 changed files with 11 additions and 11 deletions
+2 -2
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
+9 -9
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()