Skip to content

Commit

Permalink
Update CMake config to work with smesh 6.5.3.1.
Browse files Browse the repository at this point in the history
New fork of standalone smesh is available here:
https://github.com/tpaviot/smesh
  • Loading branch information
hobbes1069 authored and wwmayer committed Dec 19, 2014
1 parent 662d72b commit a8d24be
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 29 deletions.
31 changes: 11 additions & 20 deletions CMakeLists.txt
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

# ==============================================================================
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 --------------------------------

Expand Down
10 changes: 6 additions & 4 deletions cMake/FindSMESH.cmake
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/3rdParty/CMakeLists.txt
Expand Up @@ -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()

6 changes: 5 additions & 1 deletion src/Mod/Fem/App/CMakeLists.txt
Expand Up @@ -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})
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/Gui/CMakeLists.txt
Expand Up @@ -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})
Expand Down
3 changes: 2 additions & 1 deletion src/Mod/MeshPart/App/CMakeLists.txt
Expand Up @@ -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}
Expand All @@ -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)

Expand Down

0 comments on commit a8d24be

Please sign in to comment.