From 9cbf811a770628051989cea81022ae6eda6c89d2 Mon Sep 17 00:00:00 2001 From: Jules BOURDAIS Date: Tue, 19 Nov 2024 10:14:15 +0100 Subject: [PATCH] try to use swig wrapper instread of CORBA --- CMakeLists.txt | 6 ++++-- src/ARCHIMEDE/CMakeLists.txt | 3 ++- src/BlockFix/CMakeLists.txt | 3 ++- src/CMakeLists.txt | 6 +++--- src/GEOMAlgo/CMakeLists.txt | 3 ++- src/GEOMImpl/CMakeLists.txt | 3 ++- src/GEOMUtils/CMakeLists.txt | 3 ++- src/GEOM_SWIG_WITHIHM/CMakeLists.txt | 2 +- src/OCC2VTK/CMakeLists.txt | 3 ++- src/SKETCHER/CMakeLists.txt | 3 ++- src/ShHealOper/CMakeLists.txt | 4 +++- src/XAO/CMakeLists.txt | 3 ++- src/XAO_Swig/CMakeLists.txt | 2 +- 13 files changed, 28 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccd228eec..55ce60f95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) if (DEFINED EMSCRIPTEN) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND CMAKE_FIND_ROOT_PATH "/") message("Using Emscripten") add_compile_options("--use-port=boost_headers" "-pthread") @@ -67,7 +68,7 @@ ENDIF(EXISTS ${KERNEL_ROOT_DIR}) # ============== INCLUDE(SalomeSetupPlatform) # From KERNEL # Always build libraries as shared objects: -SET(BUILD_SHARED_LIBS TRUE) +SET(BUILD_SHARED_LIBS FALSE) # User options # ============ @@ -96,13 +97,14 @@ MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_GEOM_USE_OPENCV SALOME_GEOM_USE_VTK) FIND_PACKAGE(SalomePythonInterp REQUIRED) FIND_PACKAGE(SalomePythonLibs REQUIRED) -FIND_PACKAGE(SalomeOmniORBPy REQUIRED) FIND_PACKAGE(SalomeSWIG REQUIRED) IF (DEFINED EMSCRIPTEN) FIND_PACKAGE(SalomePythonWasm REQUIRED) SET(PYTHON_INCLUDE_DIRS ${PYTHONWASM_INCLUDE_DIR}) SET(PYTHON_LIBRARIES ${PYTHONWASM_LIB}) +ELSE() + FIND_PACKAGE(SalomeOmniORBPy REQUIRED) ENDIF() FIND_PACKAGE(SalomePThread REQUIRED) diff --git a/src/ARCHIMEDE/CMakeLists.txt b/src/ARCHIMEDE/CMakeLists.txt index c791bf7d6..1c4013bb0 100644 --- a/src/ARCHIMEDE/CMakeLists.txt +++ b/src/ARCHIMEDE/CMakeLists.txt @@ -34,7 +34,8 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES ${OpenCASCADE_FoundationClasses_LIBRARIES} - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh ${KERNEL_SALOMELocalTrace} ) diff --git a/src/BlockFix/CMakeLists.txt b/src/BlockFix/CMakeLists.txt index d35752cdf..b663e2a94 100644 --- a/src/BlockFix/CMakeLists.txt +++ b/src/BlockFix/CMakeLists.txt @@ -35,7 +35,8 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES ${OpenCASCADE_FoundationClasses_LIBRARIES} - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh ${KERNEL_SALOMELocalTrace} ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 942d01d02..cef2728e2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,9 +27,9 @@ SET(SUBDIRS_COMMON STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin Tools ) -# if (NOT DEFINED EMSCRIPTEN) -list(APPEND SUBDIRS_COMMON XAO_Swig GEOM_SWIG) -# endif() +if (NOT DEFINED EMSCRIPTEN) + list(APPEND SUBDIRS_COMMON XAO_Swig GEOM_SWIG) +endif() ## # OPENCV diff --git a/src/GEOMAlgo/CMakeLists.txt b/src/GEOMAlgo/CMakeLists.txt index 1139c6a0f..91ed871ed 100644 --- a/src/GEOMAlgo/CMakeLists.txt +++ b/src/GEOMAlgo/CMakeLists.txt @@ -36,7 +36,8 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES ${OpenCASCADE_FoundationClasses_LIBRARIES} - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh GEOMbasic GEOMUtils ${KERNEL_SALOMELocalTrace} ) diff --git a/src/GEOMImpl/CMakeLists.txt b/src/GEOMImpl/CMakeLists.txt index 28d980260..16ccc8437 100644 --- a/src/GEOMImpl/CMakeLists.txt +++ b/src/GEOMImpl/CMakeLists.txt @@ -45,7 +45,8 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh # ${PYTHON_LIBRARIES} ShHealOper GEOMbasic BlockFix GEOMAlgo GEOMUtils GEOMSketcher GEOMArchimede XAO ${KERNEL_SALOMELocalTrace} diff --git a/src/GEOMUtils/CMakeLists.txt b/src/GEOMUtils/CMakeLists.txt index a0b9597c3..48faf36f9 100644 --- a/src/GEOMUtils/CMakeLists.txt +++ b/src/GEOMUtils/CMakeLists.txt @@ -37,7 +37,8 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES ${OpenCASCADE_ModelingData_LIBRARIES} - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh ${OpenCASCADE_Visualization_LIBRARIES} ${LIBXML2_LIBRARIES} ${KERNEL_SALOMELocalTrace} diff --git a/src/GEOM_SWIG_WITHIHM/CMakeLists.txt b/src/GEOM_SWIG_WITHIHM/CMakeLists.txt index dfda47062..14794abdd 100644 --- a/src/GEOM_SWIG_WITHIHM/CMakeLists.txt +++ b/src/GEOM_SWIG_WITHIHM/CMakeLists.txt @@ -56,7 +56,7 @@ ADD_DEFINITIONS( SET(_link_LIBRARIES GEOMBase Material - # ${PYTHON_LIBRARIES} + ${PYTHON_LIBRARIES} ) # --- headers --- diff --git a/src/OCC2VTK/CMakeLists.txt b/src/OCC2VTK/CMakeLists.txt index 38d35d10e..daaaf53f3 100644 --- a/src/OCC2VTK/CMakeLists.txt +++ b/src/OCC2VTK/CMakeLists.txt @@ -36,7 +36,8 @@ ADD_DEFINITIONS( SET(_link_LIBRARIES VTK::FiltersCore ${OpenCASCADE_FoundationClasses_LIBRARIES} - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh ${KERNEL_SALOMELocalTrace} GEOMUtils ) diff --git a/src/SKETCHER/CMakeLists.txt b/src/SKETCHER/CMakeLists.txt index 8d4eea980..7aa0e6034 100644 --- a/src/SKETCHER/CMakeLists.txt +++ b/src/SKETCHER/CMakeLists.txt @@ -34,7 +34,8 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES ${OpenCASCADE_FoundationClasses_LIBRARIES} - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh ${OpenCASCADE_ModelingData_LIBRARIES} ${KERNEL_SALOMELocalTrace} ) diff --git a/src/ShHealOper/CMakeLists.txt b/src/ShHealOper/CMakeLists.txt index fec2c42c6..d7926a287 100644 --- a/src/ShHealOper/CMakeLists.txt +++ b/src/ShHealOper/CMakeLists.txt @@ -33,7 +33,9 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES - ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + ${OpenCASCADE_ApplicationFramework_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh ${KERNEL_SALOMELocalTrace} ) diff --git a/src/XAO/CMakeLists.txt b/src/XAO/CMakeLists.txt index fc7d4d002..416d0860c 100644 --- a/src/XAO/CMakeLists.txt +++ b/src/XAO/CMakeLists.txt @@ -41,7 +41,8 @@ SET(_link_LIBRARIES ${PTHREAD_LIBRARIES} ${LIBXML2_LIBRARIES} ${OpenCASCADE_ModelingData_LIBRARIES} - ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} + TKGeomAlgo TKTopAlgo TKPrim TKBO TKShHealing TKBool TKHLR TKFillet TKOffset TKFeat TKMesh ) # --- headers --- diff --git a/src/XAO_Swig/CMakeLists.txt b/src/XAO_Swig/CMakeLists.txt index 96ce3b39c..9eda677e2 100644 --- a/src/XAO_Swig/CMakeLists.txt +++ b/src/XAO_Swig/CMakeLists.txt @@ -38,7 +38,7 @@ ADD_DEFINITIONS( # libraries to link to SET(_link_LIBRARIES XAO - # ${PYTHON_LIBRARIES} + ${PYTHON_LIBRARIES} ) # --- scripts ---