mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-14 02:30:35 +05:00
WASM compilation of GEOM
This commit is contained in:
parent
6395ebefdf
commit
7722274ea7
@ -26,6 +26,27 @@ PROJECT(SalomeGEOM C CXX)
|
||||
# upper case
|
||||
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
|
||||
|
||||
|
||||
if (DEFINED EMSCRIPTEN)
|
||||
list(APPEND CMAKE_FIND_ROOT_PATH "/")
|
||||
message("Using Emscripten")
|
||||
add_compile_options("--use-port=boost_headers" "-pthread")
|
||||
add_link_options("-pthread")
|
||||
else()
|
||||
message("Not using Emscripten")
|
||||
endif()
|
||||
|
||||
# WASM libraries cannot be shared
|
||||
macro(ADD_GOEM_LIBRARY NAME SOURCES)
|
||||
IF (NOT DEFINED EMSCRIPTEN)
|
||||
ADD_LIBRARY(${NAME} SHARED ${SOURCES})
|
||||
ELSE()
|
||||
ADD_LIBRARY(${NAME} STATIC ${SOURCES})
|
||||
ENDIF()
|
||||
endmacro()
|
||||
|
||||
message("Size of voidP " ${CMAKE_SIZEOF_VOID_P})
|
||||
|
||||
# Common CMake macros
|
||||
# ===================
|
||||
SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
|
||||
@ -36,6 +57,7 @@ ELSE()
|
||||
MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Versioning
|
||||
# ===========
|
||||
SALOME_SETUP_VERSION(9.12.0)
|
||||
@ -43,9 +65,11 @@ MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \
|
||||
|
||||
# Find KERNEL
|
||||
# ===========
|
||||
FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
|
||||
|
||||
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
|
||||
IF(EXISTS ${KERNEL_ROOT_DIR})
|
||||
FIND_PACKAGE(SalomeKERNEL REQUIRED)
|
||||
FIND_PACKAGE(SalomeKERNEL "9.12.0" REQUIRED)
|
||||
KERNEL_WITH_CORBA() #check whether KERNEL built with CORBA
|
||||
ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
|
||||
INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
|
||||
@ -83,13 +107,13 @@ MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_GEOM_USE_OPENCV SALOME_GEOM_USE_VTK)
|
||||
##
|
||||
|
||||
# Various
|
||||
FIND_PACKAGE(SalomePythonInterp REQUIRED)
|
||||
FIND_PACKAGE(SalomePythonLibs REQUIRED)
|
||||
# FIND_PACKAGE(SalomePythonInterp REQUIRED)
|
||||
# FIND_PACKAGE(SalomePythonLibs REQUIRED)
|
||||
FIND_PACKAGE(SalomePThread REQUIRED)
|
||||
FIND_PACKAGE(SalomeSWIG REQUIRED)
|
||||
# FIND_PACKAGE(SalomeSWIG REQUIRED)
|
||||
FIND_PACKAGE(SalomeBoost REQUIRED)
|
||||
FIND_PACKAGE(SalomeOmniORB REQUIRED)
|
||||
FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
|
||||
# FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
|
||||
FIND_PACKAGE(SalomeLibXml2 REQUIRED)
|
||||
FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
|
||||
|
||||
@ -137,8 +161,6 @@ ENDIF(SALOME_BUILD_GUI)
|
||||
## GEOM specifics
|
||||
##
|
||||
|
||||
FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
|
||||
|
||||
IF(SALOME_GEOM_USE_VTK)
|
||||
FIND_PACKAGE(SalomeVTK REQUIRED)
|
||||
ADD_DEFINITIONS(-DWITH_VTK)
|
||||
|
@ -21,12 +21,16 @@
|
||||
# Common packages
|
||||
##
|
||||
SET(SUBDIRS_COMMON
|
||||
ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM ShHealOper GEOMUtils XAO XAO_Swig
|
||||
GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
|
||||
ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM ShHealOper GEOMUtils XAO
|
||||
GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_PY
|
||||
AdvancedEngine
|
||||
STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin Tools
|
||||
)
|
||||
|
||||
if (NOT DEFINED EMSCRIPTEN)
|
||||
list(SUBDIRS_COMMON APPEND XAO_Swig GEOM_SWIG)
|
||||
endif()
|
||||
|
||||
##
|
||||
# OPENCV
|
||||
##
|
||||
|
@ -62,7 +62,7 @@ SET(GEOMImpl_HEADERS
|
||||
GEOMImpl_IShapesOperations.hxx
|
||||
GEOMImpl_IBlocksOperations.hxx
|
||||
GEOMImpl_IBooleanOperations.hxx
|
||||
GEOMImpl_ICurvesOperations.hxx
|
||||
# GEOMImpl_ICurvesOperations.hxx # Uses Python
|
||||
GEOMImpl_ILocalOperations.hxx
|
||||
GEOMImpl_IInsertOperations.hxx
|
||||
GEOMImpl_IECallBack.hxx
|
||||
@ -198,7 +198,7 @@ SET(GEOMImpl_SOURCES
|
||||
GEOMImpl_IShapesOperations.cxx
|
||||
GEOMImpl_IBlocksOperations.cxx
|
||||
GEOMImpl_IBooleanOperations.cxx
|
||||
GEOMImpl_ICurvesOperations.cxx
|
||||
# GEOMImpl_ICurvesOperations.cxx # Uses Python
|
||||
GEOMImpl_ILocalOperations.cxx
|
||||
GEOMImpl_IInsertOperations.cxx
|
||||
GEOMImpl_IECallBack.cxx
|
||||
|
Loading…
Reference in New Issue
Block a user