Skip to content
Permalink
Browse files

Update CMake config to work with smesh 6.5.3.1.

New fork of standalone smesh is available here:
https://github.com/tpaviot/smesh
  • Loading branch information...
hobbes1069 authored and wwmayer committed Dec 18, 2014
1 parent 662d72b commit a8d24be3b3137f99b00dbfb20704fab6268502de
@@ -119,6 +119,7 @@ OPTION(BUILD_GUI "Build FreeCAD Gui. Otherwise you have only the command line an
OPTION(FREECAD_MAINTAINERS_BUILD "Build FreeCAD for Maintainers, with Docu and 3rd party libs. On Windows the Installer is build." OFF)
OPTION(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
OPTION(FREECAD_USE_EXTERNAL_PIVY "Use system installed python-pivy instead of the bundled." OFF)
OPTION(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)

OPTION(BUILD_CAM "Build the FreeCAD CAM module and the needed libs, be aware, unfinished code!" OFF)
@@ -169,6 +170,7 @@ endif(MSVC)
if (FREECAD_BUILD_DEBIAN)
set(FREECAD_USE_EXTERNAL_ZIPIOS ON)
set(FREECAD_USE_EXTERNAL_PIVY ON)
set(FREECAD_USE_EXTERNAL_SMESH ON)
endif (FREECAD_BUILD_DEBIAN)

# ==============================================================================
@@ -362,10 +364,6 @@ if(FREECAD_LIBPACK_USE)
message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
ENDIF(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)

# -------------------------------- PyCXX --------------------------------

find_package(PyCXX REQUIRED)

# -------------------------------- Swig ----------------------------------

find_package(SWIG)
@@ -504,24 +502,17 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)

# Salome SMESH sources are under src/3rdParty now
IF(OCC_FOUND)
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
set(SMESH_LIBRARIES
StdMeshers
#MEFISTO2
SMESH
DriverUNV
SMESHDS
DriverSTL
DriverDAT
Driver
SMDS
)
if(NOT FREECAD_USE_EXTERNAL_SMESH)
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
else()
find_package(SMESH)
if(NOT SMESH_FOUND)
message(ERROR "SMESH was not found.")
endif()
include_directories(${SMESH_INCLUDE_DIR})
endif()
set(SMESH_FOUND TRUE)
ENDIF(OCC_FOUND)
#find_package(SMESH)
#IF(NOT SMESH_FOUND)
# MESSAGE("Salome SMESH was not found!")
#ENDIF(NOT SMESH_FOUND)

# -------------------------------- Netgen --------------------------------

@@ -9,12 +9,14 @@

IF (CMAKE_COMPILER_IS_GNUCC)
FIND_PATH(SMESH_INCLUDE_DIR SMESH_Mesh.hxx
/usr/include
/usr/local/include
# These are default search paths, why specify them?
# /usr/include
# /usr/local/include
PATH_SUFFIXES smesh
)
FIND_LIBRARY(SMESH_LIBRARY SMESH
/usr/lib
/usr/local/lib
# /usr/lib
# /usr/local/lib
)
ELSE (CMAKE_COMPILER_IS_GNUCC)
# Not yet implemented
@@ -35,7 +35,7 @@ if(BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)
endif(BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)

# Build SalomeMesh for all Platforms since heavily patched
if (BUILD_SMESH)
if (BUILD_SMESH AND NOT FREECAD_USE_EXTERNAL_SMESH)
add_subdirectory(salomesmesh)
endif(BUILD_SMESH)
endif()

@@ -21,7 +21,7 @@ include_directories(
${PYTHON_INCLUDE_PATH}
${ZLIB_INCLUDE_DIR}
${XERCESC_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc
${SMESH_INCLUDE_DIR}
)

link_directories(${OCC_LIBRARY_DIR})
@@ -34,13 +34,17 @@ if(BUILD_FEM_NETGEN)
StdMeshers
NETGENPlugin
SMESH
SMDS
SMESHDS
)
else(BUILD_FEM_NETGEN)
set(Fem_LIBS
Part
FreeCADApp
StdMeshers
SMESH
SMDS
SMESHDS
)
endif(BUILD_FEM_NETGEN)

@@ -19,7 +19,7 @@ include_directories(
${QT_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH}
${XERCESC_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc
${SMESH_INCLUDE_DIR}
)

link_directories(${OCC_LIBRARY_DIR})
@@ -14,7 +14,6 @@ endif(BUILD_FEM_NETGEN)

include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
@@ -34,13 +33,15 @@ if(BUILD_FEM_NETGEN)
StdMeshers
NETGENPlugin
SMESH
SMDS
)
else(BUILD_FEM_NETGEN)
set(MeshPart_LIBS
Part
Mesh
StdMeshers
SMESH
SMDS
)
endif(BUILD_FEM_NETGEN)

0 comments on commit a8d24be

Please sign in to comment.
You can’t perform that action at this time.