From 301fcc69dc7b0f1f3f1f1e844a22cfa722253c8d Mon Sep 17 00:00:00 2001 From: akl Date: Mon, 21 Oct 2013 06:09:34 +0000 Subject: [PATCH] Introduction of CMake build procedure for YACS module. --- CMakeLists.txt | 317 ++++++++++++ Demo/CMakeLists.txt | 78 +++ .../Makefile.am => Misc/CMakeLists.txt | 3 - SalomeYACSConfig.cmake.in | 141 +++++ YACS_version.h.in | 21 +- adm/CMakeLists.txt | 24 + adm/cmake/CMakeLists.txt | 40 ++ src/Makefile.am => adm/cmake/FindExpat.cmake | 13 +- adm/cmake/FindGRAPHVIZ.cmake | 48 -- adm/cmake/FindGraphviz.cmake | 59 +++ adm/cmake/FindQScintilla.cmake | 116 +++++ adm/cmake/FindSPHINX.cmake | 95 ---- adm/cmake/FindSalomeExpat.cmake | 28 + adm/cmake/FindSalomeGraphviz.cmake | 28 + .../cmake/FindSalomeQScintilla.cmake | 18 +- adm/cmake/FindSalomeSphinx.cmake | 46 ++ .../Makefile.am => adm/cmake/FindSphinx.cmake | 38 +- adm/cmake/FindYACS.cmake | 36 ++ .../Makefile.am => adm/unix/CMakeLists.txt | 10 +- .../config_files/CMakeLists.txt} | 35 +- adm/unix/make_begin.am | 51 -- adm/unix/make_end.am | 92 ---- build_cmake.bat | 20 - build_configure | 55 -- clean_configure | 40 -- configure.in.base | 213 -------- doc/CMakeLists.txt | 109 ++++ doc/Makefile.am | 158 ------ doc/sources/header.html.in | 2 +- idl/CMakeLists.txt | 50 ++ idl/Makefile.am | 66 --- src/CMakeLists.txt | 57 +++ src/bases/CMakeLists.txt | 85 ++++ src/bases/Makefile.am | 75 --- src/bases/Test/CMakeLists.txt | 49 ++ src/bases/Test/Makefile.am | 56 -- src/engine/CMakeLists.txt | 178 +++++++ src/engine/Makefile.am | 114 ----- src/engine_swig/CMakeLists.txt | 166 ++++++ src/engine_swig/Makefile.am | 94 ---- src/genericgui/CMakeLists.txt | 476 +++++++++++++++++ src/genericgui/Makefile.am | 481 ------------------ src/hmi/CMakeLists.txt | 68 +++ src/hmi/Makefile.am | 63 --- src/pyqt/{Makefile.am => CMakeLists.txt} | 4 - src/runtime/CMakeLists.txt | 209 ++++++++ src/runtime/Makefile.am | 133 ----- src/runtime/RuntimeSALOME.cxx | 2 +- src/runtime_swig/CMakeLists.txt | 105 ++++ src/runtime_swig/Makefile.am | 74 --- src/salomegui/CMakeLists.txt | 127 +++++ src/salomegui/Makefile.am | 120 ----- src/salomegui/resources/SalomeApp.xml.in | 2 +- src/salomegui/resources/YACSCatalog.xml.in | 2 +- src/salomegui_swig/CMakeLists.txt | 94 ++++ src/salomegui_swig/Makefile.am | 66 --- .../salomeloader/CMakeLists.txt | 41 +- src/salomeloader/Makefile.am | 43 -- src/salomewrap/CMakeLists.txt | 90 ++++ src/salomewrap/Makefile.am | 81 --- .../wrappergen/CMakeLists.txt | 4 +- src/wrappergen/src/CMakeLists.txt | 63 +++ src/wrappergen/src/Makefile.am | 61 --- src/yacsloader/CMakeLists.txt | 174 +++++++ src/yacsloader/Makefile.am | 151 ------ src/yacsloader_swig/CMakeLists.txt | 96 ++++ src/yacsloader_swig/Makefile.am | 76 --- src/yacsorb/CMakeLists.txt | 28 + 68 files changed, 3233 insertions(+), 2625 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 Demo/CMakeLists.txt rename src/wrappergen/Makefile.am => Misc/CMakeLists.txt (98%) create mode 100644 SalomeYACSConfig.cmake.in create mode 100644 adm/CMakeLists.txt create mode 100644 adm/cmake/CMakeLists.txt rename src/Makefile.am => adm/cmake/FindExpat.cmake (74%) delete mode 100644 adm/cmake/FindGRAPHVIZ.cmake create mode 100644 adm/cmake/FindGraphviz.cmake create mode 100644 adm/cmake/FindQScintilla.cmake delete mode 100755 adm/cmake/FindSPHINX.cmake create mode 100644 adm/cmake/FindSalomeExpat.cmake create mode 100644 adm/cmake/FindSalomeGraphviz.cmake rename build_cmake => adm/cmake/FindSalomeQScintilla.cmake (67%) mode change 100755 => 100644 create mode 100644 adm/cmake/FindSalomeSphinx.cmake rename Demo/Makefile.am => adm/cmake/FindSphinx.cmake (51%) create mode 100644 adm/cmake/FindYACS.cmake rename src/yacsorb/Makefile.am => adm/unix/CMakeLists.txt (82%) rename adm/{cmake/FindEXPAT.cmake => unix/config_files/CMakeLists.txt} (57%) delete mode 100755 adm/unix/make_begin.am delete mode 100755 adm/unix/make_end.am delete mode 100644 build_cmake.bat delete mode 100755 build_configure delete mode 100755 clean_configure delete mode 100644 configure.in.base create mode 100644 doc/CMakeLists.txt delete mode 100644 doc/Makefile.am create mode 100644 idl/CMakeLists.txt delete mode 100644 idl/Makefile.am create mode 100755 src/CMakeLists.txt create mode 100644 src/bases/CMakeLists.txt delete mode 100644 src/bases/Makefile.am create mode 100644 src/bases/Test/CMakeLists.txt delete mode 100644 src/bases/Test/Makefile.am create mode 100644 src/engine/CMakeLists.txt delete mode 100644 src/engine/Makefile.am create mode 100644 src/engine_swig/CMakeLists.txt delete mode 100644 src/engine_swig/Makefile.am create mode 100644 src/genericgui/CMakeLists.txt delete mode 100644 src/genericgui/Makefile.am create mode 100644 src/hmi/CMakeLists.txt delete mode 100644 src/hmi/Makefile.am rename src/pyqt/{Makefile.am => CMakeLists.txt} (90%) create mode 100644 src/runtime/CMakeLists.txt delete mode 100644 src/runtime/Makefile.am create mode 100644 src/runtime_swig/CMakeLists.txt delete mode 100644 src/runtime_swig/Makefile.am create mode 100644 src/salomegui/CMakeLists.txt delete mode 100644 src/salomegui/Makefile.am create mode 100644 src/salomegui_swig/CMakeLists.txt delete mode 100644 src/salomegui_swig/Makefile.am rename Makefile.am => src/salomeloader/CMakeLists.txt (58%) delete mode 100644 src/salomeloader/Makefile.am create mode 100644 src/salomewrap/CMakeLists.txt delete mode 100644 src/salomewrap/Makefile.am rename adm/unix/make_gui_begin.am => src/wrappergen/CMakeLists.txt (91%) mode change 100755 => 100644 create mode 100644 src/wrappergen/src/CMakeLists.txt delete mode 100644 src/wrappergen/src/Makefile.am create mode 100644 src/yacsloader/CMakeLists.txt delete mode 100644 src/yacsloader/Makefile.am create mode 100644 src/yacsloader_swig/CMakeLists.txt delete mode 100644 src/yacsloader_swig/Makefile.am create mode 100644 src/yacsorb/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..89a463ece --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,317 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR) +PROJECT(SalomeYACS C CXX) + +# Ensure a proper linker behavior: +CMAKE_POLICY(SET CMP0003 NEW) + +# Versioning +# =========== +# Project name, upper case +STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) + +SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7) +SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) +SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) +SET(${PROJECT_NAME_UC}_VERSION + ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) +SET(${PROJECT_NAME_UC}_VERSION_DEV 1) + +# Find KERNEL (optional) +# ============== +OPTION(SALOME_YACS_USE_KERNEL "Use SALOME KERNEL" ON) +IF( SALOME_YACS_USE_KERNEL ) + SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") + IF( EXISTS ${KERNEL_ROOT_DIR} ) + LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files") + INCLUDE(SalomeMacros) + FIND_PACKAGE(SalomeKERNEL REQUIRED) + ADD_DEFINITIONS(${KERNEL_DEFINITIONS} -DSALOME_KERNEL) + INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS}) + ELSE( EXISTS ${KERNEL_ROOT_DIR} ) + MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR or turn option SALOME_YACS_USE_KERNEL to OFF !") + ENDIF( EXISTS ${KERNEL_ROOT_DIR} ) + SALOME_LOG_OPTIONAL_PACKAGE(SalomeKERNEL SALOME_YACS_USE_KERNEL) +ELSE( SALOME_YACS_USE_KERNEL ) + MESSAGE(STATUS "Option SALOME_YACS_USE_KERNEL is set to OFF, so YACS will be built without CORBA!!!") +ENDIF( SALOME_YACS_USE_KERNEL ) + +# Find SALOME GUI (optional) +# ============== +OPTION(SALOME_BUILD_GUI "Build GUI of YACS" ON) +IF(SALOME_BUILD_GUI) + SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI") + IF(EXISTS ${GUI_ROOT_DIR}) + LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") + FIND_PACKAGE(SalomeGUI REQUIRED) + ELSE(EXISTS ${GUI_ROOT_DIR}) + MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR or turn option SALOME_BUILD_GUI to OFF !") + ENDIF(EXISTS ${GUI_ROOT_DIR}) + SALOME_LOG_OPTIONAL_PACKAGE(SalomeGUI SALOME_BUILD_GUI) +ENDIF(SALOME_BUILD_GUI) + +# Platform setup +# ============== +INCLUDE(SalomeSetupPlatform) # From SalomeMacros +# Always build libraries as shared objects: +SET(BUILD_SHARED_LIBS TRUE) +# Local macros: +LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm/cmake") + +# User options +# ============ +# (some options may have already been defined in KERNEL) +ADD_DEFINITIONS(-DCMAKE_BUILD) +IF( SALOME_YACS_USE_KERNEL ) + OPTION(SALOME_BUILD_DOC "Generate SALOME YACS documentation" ${SALOME_BUILD_DOC}) + OPTION(SALOME_BUILD_TESTS "Build SALOME YACS tests" ${SALOME_BUILD_TESTS}) +ELSE( SALOME_YACS_USE_KERNEL ) + OPTION(SALOME_BUILD_DOC "Generate SALOME YACS documentation" ON) + OPTION(SALOME_BUILD_TESTS "Build SALOME YACS tests" ON) +ENDIF( SALOME_YACS_USE_KERNEL ) + +OPTION(SALOME_YACS_USE_SWIG "Enable Python wrapper" ON) +OPTION(SALOME_YACS_USE_DSC "Use DSC KERNEL extension" ON) +OPTION(SALOME_YACS_USE_QSCINTILLA "Use QScintilla" ON) + +# Advanced options: +IF(SALOME_YACS_USE_KERNEL AND SALOME_YACS_USE_DSC) + IF(EXISTS ${KERNEL_ROOT_DIR}/idl/salome/DSC_Engines.idl) + ADD_DEFINITIONS(-DDSC_PORTS) + ELSE() + MESSAGE(FATAL_ERROR "We absolutely need a KERNEL DSC extension. Please rebuild KERNEL with DSC support or turn option SALOME_YACS_USE_DSC to OFF !") + ENDIF() +ENDIF() + +# Prerequisites +# ============= +# Find "big" prerequisites first - they reference themselves many others +# -> this can helps to find the smaller prerequisites and detect conflicts. +# In our case KERNEL may have already loaded many prerequisites which are also used in YACS: + +## +## From KERNEL: +## + +# Mandatory products +FIND_PACKAGE(SalomePython REQUIRED) +FIND_PACKAGE(SalomePThread REQUIRED) +FIND_PACKAGE(SalomeBoost REQUIRED) +FIND_PACKAGE(SalomeOmniORB REQUIRED) +FIND_PACKAGE(SalomeOmniORBPy REQUIRED) +ADD_DEFINITIONS(-DOMNIORB) +FIND_PACKAGE(SalomeLibXml2 REQUIRED) +FIND_PACKAGE(SalomeGraphviz REQUIRED) + +# Optional products: +IF(SALOME_YACS_USE_SWIG) + FIND_PACKAGE(SalomeSWIG REQUIRED) + SALOME_LOG_OPTIONAL_PACKAGE(SWIG SALOME_YACS_USE_SWIG) +# ADD_DEFINITIONS(-DSWIG) +ENDIF() + +IF(SALOME_BUILD_TESTS) + ENABLE_TESTING() + FIND_PACKAGE(SalomeCppUnit REQUIRED) + SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS) +ENDIF() + +IF(SALOME_BUILD_DOC) + IF(SALOME_USE_MPI) + FIND_PACKAGE(SalomeMPI REQUIRED) # needed for doc generation by Sphinx + SALOME_LOG_OPTIONAL_PACKAGE(MPI SALOME_BUILD_DOC) + ENDIF() + FIND_PACKAGE(SalomeDoxygen REQUIRED) + FIND_PACKAGE(SalomeSphinx REQUIRED) + SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC) + SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC) + ADD_DEFINITIONS(-DDOXYGEN_IS_OK) +ENDIF() + +# Find optional GUI libraries +IF(SALOME_BUILD_GUI) + # Qt4 + FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) + SALOME_LOG_OPTIONAL_PACKAGE(Qt4 SALOME_BUILD_GUI) + # QScintilla + IF(SALOME_YACS_USE_QSCINTILLA) + FIND_PACKAGE(SalomeQScintilla REQUIRED) + SALOME_LOG_OPTIONAL_PACKAGE(QScintilla SALOME_YACS_USE_QSCINTILLA) + ADD_DEFINITIONS(-DHAS_QSCI4) + ENDIF(SALOME_YACS_USE_QSCINTILLA) +ENDIF(SALOME_BUILD_GUI) + +## +## YACS specifics +## + +FIND_PACKAGE(SalomeExpat REQUIRED) + +# Detection summary: +SALOME_PACKAGE_REPORT_AND_CHECK() + +# Directories +# =========== +IF( SALOME_YACS_USE_KERNEL ) + SET(SALOME_INSTALL_BINS "${SALOME_INSTALL_BINS}" CACHE PATH "Install path: SALOME binaries") + SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs") + SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files") + SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers") + SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH + "Install path: SALOME scripts") + SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH + "Install path: SALOME script data") + SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH + "Install path: SALOME Python scripts") + SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff") + SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH + "Install path: SALOME Python shared modules") + SET(SALOME_INSTALL_CMAKE_LOCAL adm/cmake CACHE PATH + "Install path: local SALOME CMake files") + SET(SALOME_INSTALL_AMCONFIG_LOCAL adm/unix CACHE PATH + "Install path: local SALOME config files (obsolete, to be removed)") + + SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources") + SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation") + +ELSE(SALOME_YACS_USE_KERNEL) + SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries") + SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs") + SET(SALOME_INSTALL_IDLS idl/salome CACHE PATH "Install path: SALOME IDL files") + SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers") + SET(SALOME_INSTALL_SCRIPT_SCRIPTS ${SALOME_INSTALL_BINS} CACHE PATH + "Install path: SALOME scripts") + SET(SALOME_INSTALL_SCRIPT_DATA ${SALOME_INSTALL_BINS} CACHE PATH + "Install path: SALOME script data") + SET(SALOME_INSTALL_SCRIPT_PYTHON ${SALOME_INSTALL_BINS} CACHE PATH + "Install path: SALOME Python scripts") + SET(SALOME_INSTALL_CMAKE_LOCAL adm/cmake CACHE PATH + "Install path: local SALOME CMake files") + SET(SALOME_INSTALL_AMCONFIG_LOCAL adm/unix CACHE PATH + "Install path: local SALOME config files (obsolete, to be removed)") + + SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) + SET(SALOME_INSTALL_PYTHON ${_pydir}/salome CACHE PATH "Install path: SALOME Python stuff") + SET(SALOME_INSTALL_PYTHON_SHARED ${SALOME_INSTALL_PYTHON}/shared_modules CACHE PATH + "Install path: SALOME Python shared modules") + + SET(SALOME_INSTALL_RES share/salome/resources CACHE PATH "Install path: SALOME resources") + + SET(SALOME_INSTALL_DOC share/doc/salome CACHE PATH "Install path: SALOME documentation") +ENDIF(SALOME_YACS_USE_KERNEL) + +# Specific to YACS: +SET(SALOME_YACS_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/yacs" CACHE PATH + "Install path: SALOME YACS specific data") +SET(SALOME_YACS_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/yacs" CACHE PATH + "Install path: SALOME YACS scripts") +SET(SALOME_YACS_INSTALL_SAMPLES share/salome/yacssamples CACHE PATH + "Install path: SALOME YACS samples") +SET(SALOME_YACS_INSTALL_SUPERV_SAMPLES share/salome/yacssupervsamples CACHE PATH + "Install path: SALOME YACS SUPERV samples") +SET(SALOME_INSTALL_HXX2SALOME bin/HXX2SALOME_Test CACHE PATH + "Install path: SALOME HXX2SALOME Test files") +MARK_AS_ADVANCED( + SALOME_YACS_INSTALL_RES_DATA + SALOME_YACS_INSTALL_RES_SCRIPTS + SALOME_YACS_INSTALL_SAMPLES + SALOME_YACS_INSTALL_SUPERV_SAMPLES + SALOME_INSTALL_HXX2SALOME + ) + +# Sources +# ======== +IF(SALOME_YACS_USE_KERNEL AND NOT SALOME_LIGHT_ONLY) + ADD_SUBDIRECTORY(idl) +ENDIF() + +ADD_SUBDIRECTORY(adm) +ADD_SUBDIRECTORY(src) +IF(SALOME_BUILD_DOC) + ADD_SUBDIRECTORY(doc) +ENDIF() +ADD_SUBDIRECTORY(Demo) +ADD_SUBDIRECTORY(Misc) + +# Header configuration +# ==================== +SALOME_XVERSION(${PROJECT_NAME}) +SALOME_CONFIGURE_FILE(YACS_version.h.in YACS_version.h INSTALL ${SALOME_INSTALL_HEADERS}) + +# Configuration export +# (here only the level 1 prerequisites are exposed) +# ==================== +INCLUDE(CMakePackageConfigHelpers) + +# List of targets in this project we want to make visible to the rest of the world. +# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup" +SET(_${PROJECT_NAME}_exposed_targets + YACSloader YACSBases YACSlibEngine YACSRuntimeSALOME YACSDLTest SalomeIDLYACS + #TODO: TestComponentLocal PluginSimplex PluginOptEvTest1 +) +IF(SALOME_BUILD_GUI) + LIST(APPEND _${PROJECT_NAME}_exposed_targets + HMI GenericGui YACS SalomeWrap + ) +ENDIF(SALOME_BUILD_GUI) + +# Add all targets to the build-tree export set +EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets} + FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake) + +# Create the configuration files: +# - in the build tree: + +# Ensure the variables are always defined for the configure: +SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}") +SET(EXPAT_ROOT_DIR "${EXPAT_ROOT_DIR}") +SET(QSCINTILLA_ROOT_DIR "${QSCINTILLA_ROOT_DIR}") + +SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include") +CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in + ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" + PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX + KERNEL_ROOT_DIR GUI_ROOT_DIR QT4_ROOT_DIR) + +# - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?): +# Get the relative path of the include directory so +# we can register it in the generated configuration files: +#SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") +#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in +# ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake +# INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" +# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX +# KERNEL_ROOT_DIR SIP_ROOT_DIR QT4_ROOT_DIR PYQT4_ROOT_DIR CAS_ROOT_DIR +# OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR) + +WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + VERSION ${${PROJECT_NAME_UC}_VERSION} + COMPATIBILITY AnyNewerVersion) + +# Install the CMake configuration files: +INSTALL(FILES + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}") + +# Install the export set for use with the install-tree +INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" + FILE ${PROJECT_NAME}Targets.cmake) diff --git a/Demo/CMakeLists.txt b/Demo/CMakeLists.txt new file mode 100644 index 000000000..2e507d456 --- /dev/null +++ b/Demo/CMakeLists.txt @@ -0,0 +1,78 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(UseOmniORB) + +# --- options --- + +# additional include directories +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ) + +IF(WINDOWS) + ADD_DEFINITIONS(-DNOGDI) +ENDIF(WINDOWS) + +SET(echo_IDLSOURCES + echo.idl +) + +SET(IDL_INCLUDE_DIRS + ${KERNEL_ROOT_DIR}/idl/salome + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) +SET(IDL_LINK_FLAGS + ${KERNEL_SalomeIDLKernel} +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ${OMNIORB_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + ${OMNIORB_LIBRARIES} + + ) + +# --- sources --- + +SET(echoSrvDemo_SOURCES + echoSrv.cxx + echoSK.cc + ) + +# --- rules --- + +OMNIORB_ADD_MODULE(echo "${echo_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}") + +ADD_EXECUTABLE(echoSrvDemo ${echoSrvDemo_SOURCES}) +TARGET_LINK_LIBRARIES(echoSrvDemo ${_link_LIBRARIES}) +INSTALL(TARGETS echoSrvDemo EXPORT ${PROJECT_NAME}TargetGroup +DESTINATION ${SALOME_INSTALL_BINS}) + +ADD_DEPENDENCIES(echoSrvDemo echo) + +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/schema_orig.xml schema.xml) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/xmlrpcprog_orig.py xmlrpcprog.py) diff --git a/src/wrappergen/Makefile.am b/Misc/CMakeLists.txt similarity index 98% rename from src/wrappergen/Makefile.am rename to Misc/CMakeLists.txt index b42feff8a..d9abdc131 100644 --- a/src/wrappergen/Makefile.am +++ b/Misc/CMakeLists.txt @@ -16,6 +16,3 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # - -SUBDIRS=src - diff --git a/SalomeYACSConfig.cmake.in b/SalomeYACSConfig.cmake.in new file mode 100644 index 000000000..5fcd04f7b --- /dev/null +++ b/SalomeYACSConfig.cmake.in @@ -0,0 +1,141 @@ +# - Config file for the @PROJECT_NAME@ package +# It defines the following variables. +# Specific to the pacakge @PROJECT_NAME@ itself: +# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file +# + +############################################################### +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or +# email : webmaster.salome@opencascade.com +############################################################### +#TODO +### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE: +@PACKAGE_INIT@ + +# Load the dependencies for the libraries of @PROJECT_NAME@ +# (contains definitions for IMPORTED targets). This is only +# imported if we are not built as a subproject (in this case targets are already there) +IF(NOT TARGET GEOMbasic AND NOT @PROJECT_NAME@_BINARY_DIR) + INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE_LOCAL@/@PROJECT_NAME@Targets.cmake") +ENDIF() + +# Package root dir: +SET_AND_CHECK(YACS_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@") + +# Include directories +SET_AND_CHECK(YACS_INCLUDE_DIRS "${YACS_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@") + +#### Now the specificities + +# Options exported by the package: +SET(SALOME_BUILD_DOC @SALOME_BUILD_DOC@) +SET(SALOME_BUILD_TESTS @SALOME_BUILD_TESTS@) + +# Advanced options +SET(SALOME_BUILD_GUI @SALOME_BUILD_GUI@) +SET(SALOME_YACS_USE_KERNEL @SALOME_YACS_USE_KERNEL@) +SET(SALOME_YACS_USE_DSC @SALOME_YACS_USE_DSC@) +SET(SALOME_YACS_USE_QSCINTILLA @SALOME_YACS_USE_QSCINTILLA@) +SET(SALOME_YACS_USE_SWIG @SALOME_YACS_USE_SWIG@) + +# Level 1 prerequisites: +SET_AND_CHECK(EXPAT_ROOT_DIR_EXP "@PACKAGE_EXPAT_ROOT_DIR@") + +# Optional level 1 prerequisites: +IF(SALOME_YACS_USE_KERNEL) + SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@") +ELSE() + SET_AND_CHECK(PYTHON_ROOT_DIR_EXP "@PACKAGE_PYTHON_ROOT_DIR@") + SET_AND_CHECK(BOOST_ROOT_DIR_EXP "@PACKAGE_BOOST_ROOT_DIR@") + SET_AND_CHECK(OMNIORB_ROOT_DIR_EXP "@PACKAGE_OMNIORB_ROOT_DIR@") + SET_AND_CHECK(LIBXML2_ROOT_DIR_EXP "@PACKAGE_LIBXML2_ROOT_DIR@") + SET_AND_CHECK(GRAPHVIZ_ROOT_DIR_EXP "@PACKAGE_GRAPHVIZ_ROOT_DIR@") + IF(SALOME_YACS_USE_SWIG) + SET_AND_CHECK(SWIG_ROOT_DIR_EXP "@PACKAGE_SWIG_ROOT_DIR@") + ENDIF() + IF(SALOME_BUILD_DOC) + SET_AND_CHECK(DOXYGEN_ROOT_DIR_EXP "@PACKAGE_DOXYGEN_ROOT_DIR@") + SET_AND_CHECK(SPHINX_ROOT_DIR_EXP "@PACKAGE_SPHINX_ROOT_DIR@") + ENDIF() +ENDIF() +IF(SALOME_BUILD_GUI) + SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@") + IF(SALOME_YACS_USE_QSCINTILLA) + SET_AND_CHECK(QSCINTILLA_ROOT_DIR_EXP "@PACKAGE_QSCINTILLA_ROOT_DIR@") + ENDIF() +ENDIF() + +# For all prerequisites, load the corresponding targets if the package was used +# in CONFIG mode. This ensures dependent projects link correctly +# without having to set LD_LIBRARY_PATH: +SET(_PREREQ SalomeGUI Expat) +SET(_PREREQ_CONFIG_DIR "@SalomeGUI_DIR@" "@Expat_DIR@") +LIST(LENGTH _PREREQ_CONFIG_DIR _list_len) +# Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ... +MATH(EXPR _range "${_list_len}-1") +FOREACH(_p RANGE ${_range}) + LIST(GET _PREREQ ${_p} _pkg ) + LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir) + IF(_pkg_dir) + MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...") + FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE + PATHS "${_pkg_dir}" + NO_DEFAULT_PATH) + ENDIF() +ENDFOREACH() + +# Installation directories +SET(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@") +SET(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@") +SET(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@") +SET(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@") +SET(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@") +SET(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@") +SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@") +SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@") +SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@") +SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@") +SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@") +SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@") +SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@") +SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@") + +# Include KERNEL targets if they were not already loaded: +IF(NOT (TARGET SALOMEBasics)) + INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake") +ENDIF() + +# Exposed YACS targets: +SET(YACS_YACSloader YACSloader) +SET(YACS_YACSBases YACSBases) +SET(YACS_YACSlibEngine YACSlibEngine) +SET(YACS_YACSRuntimeSALOME YACSRuntimeSALOME) +SET(YACS_YACSDLTest YACSDLTest) +SET(YACS_SalomeIDLYACS SalomeIDLYACS) +#TODO: +#SET(YACS_TestComponentLocal TestComponentLocal) +#SET(YACS_PluginSimplex PluginSimplex) +#SET(YACS_PluginOptEvTest1 PluginOptEvTest1) +SET(YACS_HMI HMI) +SET(YACS_GenericGui GenericGui) +SET(YACS_YACS YACS) +SET(YACS_SalomeWrap SalomeWrap) diff --git a/YACS_version.h.in b/YACS_version.h.in index e9ea22cde..09a5d4468 100644 --- a/YACS_version.h.in +++ b/YACS_version.h.in @@ -20,12 +20,23 @@ #if !defined(__YACS_VERSION_H__) #define __YACS_VERSION_H__ -/* - YACS_VERSION is (major << 16) + (minor << 8) + patch. +/*! + Specify version of SALOME YACS module, as follows + + YACS_VERSION_MAJOR : (integer) number identifying major version + YACS_VERSION_MINOR : (integer) number identifying minor version + YACS_VERSION_MAINTENANCE : (integer) number identifying maintenance version + YACS_VERSION_STR : (string) complete version number "major.minor.maintenance" + YACS_VERSION : (hex) complete version number (major << 16) + (minor << 8) + maintenance + YACS_DEVELOPMENT : (integer) indicates development version when set to 1 */ -#define YACS_VERSION_STR "@VERSION@" -#define YACS_VERSION @XVERSION@ -#define YACS_DEVELOPMENT @VERSION_DEV@ +#define YACS_VERSION_MAJOR @SALOMEYACS_MAJOR_VERSION@ +#define YACS_VERSION_MINOR @SALOMEYACS_MINOR_VERSION@ +#define YACS_VERSION_MAINTENANCE @SALOMEYACS_PATCH_VERSION@ +#define YACS_VERSION_STR "@SALOMEYACS_VERSION@" +#define YACS_VERSION @SALOMEYACS_XVERSION@ +#define YACS_DEVELOPMENT @SALOMEYACS_VERSION_DEV@ + #endif // __YACS_VERSION_H__ diff --git a/adm/CMakeLists.txt b/adm/CMakeLists.txt new file mode 100644 index 000000000..b8d8bb864 --- /dev/null +++ b/adm/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +ADD_SUBDIRECTORY(unix) +ADD_SUBDIRECTORY(cmake) diff --git a/adm/cmake/CMakeLists.txt b/adm/cmake/CMakeLists.txt new file mode 100644 index 000000000..aa66cd416 --- /dev/null +++ b/adm/cmake/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are data, module or lib files +SET(_adm_data + FindExpat.cmake + FindSalomeExpat.cmake + FindQScintilla.cmake + FindSalomeQScintilla.cmake + FindSphinx.cmake + FindSalomeSphinx.cmake + FindYACS.cmake +) +IF(NOT SALOME_YACS_USE_KERNEL) + LIST(APPEND _adm_data + FindGraphviz.cmake + FindSalomeGraphviz.cmake + ) +ENDIF(NOT SALOME_YACS_USE_KERNEL) +INSTALL(FILES ${_adm_data} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}) diff --git a/src/Makefile.am b/adm/cmake/FindExpat.cmake similarity index 74% rename from src/Makefile.am rename to adm/cmake/FindExpat.cmake index 7b5b1ded2..253656b06 100644 --- a/src/Makefile.am +++ b/adm/cmake/FindExpat.cmake @@ -17,12 +17,9 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -MAIN_SUBDIRS = bases engine engine_swig runtime runtime_swig wrappergen yacsloader yacsloader_swig yacsorb salomeloader +FIND_LIBRARY(EXPAT_LIBRARIES expat libexpat) +FIND_PATH(EXPAT_INCLUDE_DIR expat.h) -if WITH_QT4 -if HAS_GUI -GUI_SUBDIRS = pyqt hmi salomewrap genericgui salomegui salomegui_swig -endif -endif - -SUBDIRS = $(MAIN_SUBDIRS) $(GUI_SUBDIRS) +# Handle the standard arguments of the find_package() command: +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Expat REQUIRED_VARS EXPAT_LIBRARIES EXPAT_INCLUDE_DIR) diff --git a/adm/cmake/FindGRAPHVIZ.cmake b/adm/cmake/FindGRAPHVIZ.cmake deleted file mode 100644 index d8e92ea27..000000000 --- a/adm/cmake/FindGRAPHVIZ.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -SET(GRAPHVIZ_LIBS) -IF(WINDOWS) - SET(GRAPHVIZHOME $ENV{GRAPHVIZHOME}) - FIND_PATH(GRAPHVIZ_INCLUDE_DIR gvc.h ${GRAPHVIZHOME}/include/graphviz) - - SET(GRAPHVIZBIN ${GRAPHVIZHOME}/bin) - IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # if platform is Windows 64 bit - SET(GRAPHVIZBIN ${GRAPHVIZBIN}/x64) - ENDIF() - - FIND_LIBRARY(GVC_LIB gvc HINTS "${GRAPHVIZBIN}") - SET(GRAPHVIZ_LIBS ${GRAPHVIZ_LIBS} ${GVC_LIB}) - - FIND_LIBRARY(GRAPH_LIB graph HINTS "${GRAPHVIZBIN}") - SET(GRAPHVIZ_LIBS ${GRAPHVIZ_LIBS} ${GRAPH_LIB}) -ELSE(WINDOWS) - SET(GRAPHVIZHOME $ENV{GRAPHVIZHOME}) - IF(NOT GRAPHVIZHOME) - SET(GRAPHVIZHOME /usr) - ENDIF(NOT GRAPHVIZHOME) - FIND_PATH(GRAPHVIZ_INCLUDE_DIR gvc.h ${GRAPHVIZHOME}/include/graphviz) - FIND_LIBRARY(GVC_LIB gvc ${GRAPHVIZHOME}/lib) - SET(GRAPHVIZ_LIBS ${GRAPHVIZ_LIBS} ${GVC_LIB}) -ENDIF(WINDOWS) - -IF(GRAPHVIZ_INCLUDE_DIR) - SET(GRAPHVIZ_CPPFLAGS -I${GRAPHVIZ_INCLUDE_DIR}) -ENDIF(GRAPHVIZ_INCLUDE_DIR) -SET(GRAPHVIZ_LIBADD ${GRAPHVIZ_LIBS}) diff --git a/adm/cmake/FindGraphviz.cmake b/adm/cmake/FindGraphviz.cmake new file mode 100644 index 000000000..2b9e71678 --- /dev/null +++ b/adm/cmake/FindGraphviz.cmake @@ -0,0 +1,59 @@ +# - Graphviz detection +# +# Output variables: GRAPHVIZ_EXECUTABLE - where is executable 'dot' takes place. +# GRAPHVIZ_INCLUDE_DIRS - where to find headers. +# GRAPHVIZ_LIBRARIES - where to get libraries. +# GRAPHVIZ_FOUND - True if Graphiz was found. +# +########################################################################### +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +########################################################################### + +FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot) + +FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/graph.h) +SET(GRAPHVIZ_INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIR} ${GRAPHVIZ_INCLUDE_DIR}/graphviz) + +FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY NAMES cdt) +FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY NAMES cgraph) +FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES graph) +FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY NAMES gvc) +FIND_LIBRARY(GRAPHVIZ_gvpr_LIBRARY NAMES gvpr) +FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan) +FIND_LIBRARY(GRAPHVIZ_xdot_LIBRARY NAMES xdot) +SET(GRAPHVIZ_LIBRARIES + ${GRAPHVIZ_cdt_LIBRARY} + ${GRAPHVIZ_cgraph_LIBRARY} + ${GRAPHVIZ_graph_LIBRARY} + ${GRAPHVIZ_gvc_LIBRARY} + ${GRAPHVIZ_gvpr_LIBRARY} + ${GRAPHVIZ_pathplan_LIBRARY} + ${GRAPHVIZ_xdot_LIBRARY} + ) + +# Handle the standard arguments of the find_package() command: +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Graphviz REQUIRED_VARS + GRAPHVIZ_EXECUTABLE + GRAPHVIZ_LIBRARIES + GRAPHVIZ_INCLUDE_DIRS) diff --git a/adm/cmake/FindQScintilla.cmake b/adm/cmake/FindQScintilla.cmake new file mode 100644 index 000000000..ee814eca7 --- /dev/null +++ b/adm/cmake/FindQScintilla.cmake @@ -0,0 +1,116 @@ +# QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor control +# available at http://www.riverbankcomputing.com/software/qscintilla/ +# +# The module defines the following variables: +# QSCINTILLA_FOUND - the system has QScintilla +# QSCINTILLA_INCLUDE_DIR - where to find Qsci/qsciscintilla.h +# QSCINTILLA_INCLUDE_DIRS - qwt includes +# QSCINTILLA_LIBRARY - where to find the QScintilla library +# QSCINTILLA_LIBRARIES - aditional libraries +# QSCINTILLA_MAJOR_VERSION - major version +# QSCINTILLA_MINOR_VERSION - minor version +# QSCINTILLA_PATCH_VERSION - patch version +# QSCINTILLA_VERSION_STRING - version (ex. 2.6.2) +# QSCINTILLA_ROOT_DIR - root dir (ex. /usr/local) + +#============================================================================= +# Copyright 2010-2013, Julien Schueller +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# The views and conclusions contained in the software and documentation are those +# of the authors and should not be interpreted as representing official policies, +# either expressed or implied, of the FreeBSD Project. +#============================================================================= + + +find_path ( QSCINTILLA_INCLUDE_DIR + NAMES Qsci/qsciscintilla.h + HINTS ${QT_INCLUDE_DIR} +) + +set ( QSCINTILLA_INCLUDE_DIRS ${QSCINTILLA_INCLUDE_DIR} ${QSCINTILLA_INCLUDE_DIR}/Qsci ) + +# version +set ( _VERSION_FILE ${QSCINTILLA_INCLUDE_DIR}/Qsci/qsciglobal.h ) +if ( EXISTS ${_VERSION_FILE} ) + file ( STRINGS ${_VERSION_FILE} _VERSION_LINE REGEX "define[ ]+QSCINTILLA_VERSION_STR" ) + if ( _VERSION_LINE ) + string ( REGEX REPLACE ".*define[ ]+QSCINTILLA_VERSION_STR[ ]+\"(.*)\".*" "\\1" QSCINTILLA_VERSION_STRING "${_VERSION_LINE}" ) + string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" QSCINTILLA_MAJOR_VERSION "${QSCINTILLA_VERSION_STRING}" ) + string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" QSCINTILLA_MINOR_VERSION "${QSCINTILLA_VERSION_STRING}" ) + string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" QSCINTILLA_PATCH_VERSION "${QSCINTILLA_VERSION_STRING}" ) + endif () +endif () + + +# check version +set ( _QSCINTILLA_VERSION_MATCH TRUE ) +if ( QScintilla_FIND_VERSION AND QSCINTILLA_VERSION_STRING ) + if ( QScintilla_FIND_VERSION_EXACT ) + if ( NOT QScintilla_FIND_VERSION VERSION_EQUAL QSCINTILLA_VERSION_STRING ) + set ( _QSCINTILLA_VERSION_MATCH FALSE ) + endif () + else () + if ( QSCINTILLA_VERSION_STRING VERSION_LESS QScintilla_FIND_VERSION ) + set ( _QSCINTILLA_VERSION_MATCH FALSE ) + endif () + endif () +endif () + + +find_library ( QSCINTILLA_LIBRARY + NAMES qscintilla qscintilla2 libqscintilla2 + HINTS ${QT_LIBRARY_DIR} +) + +set ( QSCINTILLA_LIBRARIES ${QSCINTILLA_LIBRARY} ) + + +# try to guess root dir from include dir +if ( QSCINTILLA_INCLUDE_DIR ) + string ( REGEX REPLACE "(.*)/include.*" "\\1" QSCINTILLA_ROOT_DIR ${QSCINTILLA_INCLUDE_DIR} ) +# try to guess root dir from library dir +elseif ( QSCINTILLA_LIBRARY ) + string ( REGEX REPLACE "(.*)/lib[/|32|64].*" "\\1" QSCINTILLA_ROOT_DIR ${QSCINTILLA_LIBRARY} ) +endif () + + +# handle the QUIETLY and REQUIRED arguments +include ( FindPackageHandleStandardArgs ) +if ( CMAKE_VERSION LESS 2.8.3 ) + find_package_handle_standard_args( QScintilla DEFAULT_MSG QSCINTILLA_LIBRARY QSCINTILLA_INCLUDE_DIR _QSCINTILLA_VERSION_MATCH ) +else () + find_package_handle_standard_args( QScintilla REQUIRED_VARS QSCINTILLA_LIBRARY QSCINTILLA_INCLUDE_DIR _QSCINTILLA_VERSION_MATCH VERSION_VAR QSCINTILLA_VERSION_STRING ) +endif () + +mark_as_advanced ( + QSCINTILLA_LIBRARY + QSCINTILLA_LIBRARIES + QSCINTILLA_INCLUDE_DIR + QSCINTILLA_INCLUDE_DIRS + QSCINTILLA_MAJOR_VERSION + QSCINTILLA_MINOR_VERSION + QSCINTILLA_PATCH_VERSION + QSCINTILLA_VERSION_STRING + QSCINTILLA_ROOT_DIR +) diff --git a/adm/cmake/FindSPHINX.cmake b/adm/cmake/FindSPHINX.cmake deleted file mode 100755 index 6c894e3fb..000000000 --- a/adm/cmake/FindSPHINX.cmake +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# ------ -MESSAGE(STATUS "Check for sphinx ...") -# ------ - -IF(SPHINX_IS_MANDATORY STREQUAL 0) - SET(SPHINX_IS_MANDATORY 0) - SET(SPHINX_IS_OPTIONAL 1) -ENDIF(SPHINX_IS_MANDATORY STREQUAL 0) -IF(SPHINX_IS_OPTIONAL STREQUAL 0) - SET(SPHINX_IS_MANDATORY 1) - SET(SPHINX_IS_OPTIONAL 0) -ENDIF(SPHINX_IS_OPTIONAL STREQUAL 0) -IF(NOT SPHINX_IS_MANDATORY AND NOT SPHINX_IS_OPTIONAL) - SET(SPHINX_IS_MANDATORY 0) - SET(SPHINX_IS_OPTIONAL 1) -ENDIF(NOT SPHINX_IS_MANDATORY AND NOT SPHINX_IS_OPTIONAL) - -# ------ - -SET(SPHINX_STATUS 1) -IF(WITHOUT_SPHINX OR WITH_SPHINX STREQUAL 0) - SET(SPHINX_STATUS 0) - MESSAGE(STATUS "sphinx disabled from command line.") -ENDIF(WITHOUT_SPHINX OR WITH_SPHINX STREQUAL 0) - -# ------ - -IF(SPHINX_STATUS) - IF(WITH_SPHINX) - SET(SPHINX_ROOT_USER ${WITH_SPHINX}) - ENDIF(WITH_SPHINX) - IF(NOT SPHINX_ROOT_USER) - SET(SPHINX_ROOT_USER $ENV{SPHINX_ROOT}) - ENDIF(NOT SPHINX_ROOT_USER) - IF(NOT SPHINX_ROOT_USER) - SET(SPHINX_ROOT_USER $ENV{SPHINXHOME}) - ENDIF(NOT SPHINX_ROOT_USER) -ENDIF(SPHINX_STATUS) - -# ------ - -IF(SPHINX_STATUS) - SET(SPHINX_EXECUTABLE_TO_FIND sphinx-build) - IF(SPHINX_ROOT_USER) - SET(BINDIR) - IF(WINDOWS) - SET(BINDIR ${SPHINX_ROOT_USER}/Scripts) - ELSE(WINDOWS) - SET(BINDIR ${SPHINX_ROOT_USER}/bin) - ENDIF(WINDOWS) - FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND} PATHS ${BINDIR} NO_DEFAULT_PATH) - ELSE(SPHINX_ROOT_USER) - FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND}) - ENDIF(SPHINX_ROOT_USER) - IF(SPHINX_EXECUTABLE) - MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found: ${SPHINX_EXECUTABLE}") - ELSE(SPHINX_EXECUTABLE) - MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} not found, try to use WITH_SPHINX option or SPHINX_ROOT (or SPHINXHOME) environment variable") - SET(SPHINX_STATUS 0) - ENDIF(SPHINX_EXECUTABLE) -ENDIF(SPHINX_STATUS) - -# ---- - -IF(SPHINX_STATUS) - SET(SPHINX_IS_OK 1) -ELSE(SPHINX_STATUS) - SET(SPHINX_IS_OK 0) - IF(SPHINX_IS_MANDATORY) - MESSAGE(FATAL_ERROR "sphinx not found ... mandatory ... abort") - ELSE(SPHINX_IS_MANDATORY) - MESSAGE(STATUS "sphinx not found ... optional ... disabled") - ENDIF(SPHINX_IS_MANDATORY) -ENDIF(SPHINX_STATUS) - -# ---- diff --git a/adm/cmake/FindSalomeExpat.cmake b/adm/cmake/FindSalomeExpat.cmake new file mode 100644 index 000000000..fe7a6f910 --- /dev/null +++ b/adm/cmake/FindSalomeExpat.cmake @@ -0,0 +1,28 @@ +# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# Expat detection for Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Expat EXPAT_ROOT_DIR 0) +MARK_AS_ADVANCED(EXPAT_LIBRARIES EXPAT_INCLUDE_DIR) +#IF(Expat_FOUND OR EXPAT_FOUND) +# MESSAGE(STATUS "EXPAT include dir is: ${EXPAT_INCLUDE_DIR}") +#ENDIF() diff --git a/adm/cmake/FindSalomeGraphviz.cmake b/adm/cmake/FindSalomeGraphviz.cmake new file mode 100644 index 000000000..e355263b1 --- /dev/null +++ b/adm/cmake/FindSalomeGraphviz.cmake @@ -0,0 +1,28 @@ +# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author: Adrien Bruneton +# + +# Graphviz detection for salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# + +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIRS 2) +MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIRS) diff --git a/build_cmake b/adm/cmake/FindSalomeQScintilla.cmake old mode 100755 new mode 100644 similarity index 67% rename from build_cmake rename to adm/cmake/FindSalomeQScintilla.cmake index 94b49c6ef..cf2696aaf --- a/build_cmake +++ b/adm/cmake/FindSalomeQScintilla.cmake @@ -1,5 +1,4 @@ -#!/bin/sh -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D +# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -18,10 +17,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -CURRENT_DIR=`pwd` -CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` -cd ${CONF_DIR} -python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --yacs -status=$? -cd ${CURRENT_DIR} -exit $status +# QScintilla detection for Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(QScintilla QSCINTILLA_ROOT_DIR 0) +# IF(QScintilla_FOUND OR QSCINTILLA_FOUND) +# MESSAGE(STATUS "QScintilla include dir is: ${QSCINTILLA_INCLUDE_DIRS}") +# ENDIF() diff --git a/adm/cmake/FindSalomeSphinx.cmake b/adm/cmake/FindSalomeSphinx.cmake new file mode 100644 index 000000000..2d26445a9 --- /dev/null +++ b/adm/cmake/FindSalomeSphinx.cmake @@ -0,0 +1,46 @@ +# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# Sphinx detection for Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +# The caller of this macro might set SPHINX_PYTHONPATH to provide a path to be added in front +# of the PYTHONPATH with which the sphinx command should be ran. +# +# Note the environment is also overriden in +# doc/docutils/CMakeLists.txt +# with the creation of a dedicated launcher script. +# + +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Sphinx SPHINX_EXECUTABLE 2) + +# Also retrieve paths to DOCUTILS and SETUPTOOLS: +SET(SETUPTOOLS_ROOT_DIR "$ENV{SETUPTOOLS_ROOT_DIR}" CACHE PATH "Path to the Setuptools installation") +SET(DOCUTILS_ROOT_DIR "$ENV{DOCUTILS_ROOT_DIR}" CACHE PATH "Path to the Setuptools installation") + +# Ensure the command is run with the given PYTHONPATH +IF(WIN32 AND NOT CYGWIN) + MESSAGE(WARNING "Sphinx windows command not re-tested.") + SET(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE}) +ELSE() + SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_EXECUTABLE}) +ENDIF() + +MARK_AS_ADVANCED(SPHINX_EXECUTABLE) diff --git a/Demo/Makefile.am b/adm/cmake/FindSphinx.cmake similarity index 51% rename from Demo/Makefile.am rename to adm/cmake/FindSphinx.cmake index ec68c6963..8e05c7a73 100644 --- a/Demo/Makefile.am +++ b/adm/cmake/FindSphinx.cmake @@ -1,4 +1,16 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D +# - Sphinx detection +# +# Output variable: SPHINX_EXECUTABLE +# +# +# The executable 'sphinx-build' is looked for and returned in the above variable. +# + +########################################################################### +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -16,25 +28,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +########################################################################### -include $(top_srcdir)/adm/unix/make_begin.am - -IDL_FILES = echo.idl -BUILT_SOURCES = echoSK.cc schema.xml xmlrpcprog.py -bin_PROGRAMS=echoSrvDemo -echoSrvDemo_SOURCES = echoSrv.cxx -nodist_echoSrvDemo_SOURCES = echoSK.cc -echoSrvDemo_CXXFLAGS = -I. $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) -echoSrvDemo_LDFLAGS = $(OMNIORB_LIBS) -AM_CXXFLAGS = $(THREAD_DEF) - -EXTRA_DIST = echo.idl schema_orig.xml xmlrpcprog_orig.py - -schema.xml:schema_orig.xml - cp $(srcdir)/schema_orig.xml schema.xml -xmlrpcprog.py:xmlrpcprog_orig.py - cp $(srcdir)/xmlrpcprog_orig.py xmlrpcprog.py +FIND_PROGRAM(SPHINX_EXECUTABLE sphinx-build) -CLEANFILES = *.hh *SK.cc schema.xml xmlrpcprog.py +# Handle the standard arguments of the find_package() command: +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE) -include $(top_srcdir)/adm/unix/make_end.am diff --git a/adm/cmake/FindYACS.cmake b/adm/cmake/FindYACS.cmake new file mode 100644 index 000000000..6c960beee --- /dev/null +++ b/adm/cmake/FindYACS.cmake @@ -0,0 +1,36 @@ +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(YACS_CXXFLAGS -I${YACS_ROOT_DIR}/include/salome) # to be removed +SET(YACS_INCLUDE_DIRS ${YACS_ROOT_DIR}/include/salome) + +FIND_LIBRARY(YACS_YACSloader YACSloader ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_YACSBases YACSBases ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_YACSlibEngine YACSlibEngine ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_YACSRuntimeSALOME YACSRuntimeSALOME ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_YACSDLTest YACSDLTest ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_SalomeIDLYACS SalomeIDLYACS ${YACS_ROOT_DIR}/lib/salome) +#TODO: +#FIND_LIBRARY(YACS_TestComponentLocal TestComponentLocal ${YACS_ROOT_DIR}/lib/salome) +#FIND_LIBRARY(YACS_PluginSimplex PluginSimplex ${YACS_ROOT_DIR}/lib/salome) +#FIND_LIBRARY(YACS_PluginOptEvTest1 PluginOptEvTest1 ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_HMI HMI ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_GenericGui GenericGui ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_YACS YACS ${YACS_ROOT_DIR}/lib/salome) +FIND_LIBRARY(YACS_SalomeWrap SalomeWrap ${YACS_ROOT_DIR}/lib/salome) diff --git a/src/yacsorb/Makefile.am b/adm/unix/CMakeLists.txt similarity index 82% rename from src/yacsorb/Makefile.am rename to adm/unix/CMakeLists.txt index ce6e5696c..2f895ae4b 100644 --- a/src/yacsorb/Makefile.am +++ b/adm/unix/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,10 +17,4 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -include $(top_srcdir)/adm/unix/make_begin.am - - -salomepython_PYTHON = YACS.py - - -include $(top_srcdir)/adm/unix/make_end.am +ADD_SUBDIRECTORY(config_files) diff --git a/adm/cmake/FindEXPAT.cmake b/adm/unix/config_files/CMakeLists.txt similarity index 57% rename from adm/cmake/FindEXPAT.cmake rename to adm/unix/config_files/CMakeLists.txt index b2ac86cfd..6e6cb8cea 100644 --- a/adm/cmake/FindEXPAT.cmake +++ b/adm/unix/config_files/CMakeLists.txt @@ -1,4 +1,7 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,15 +20,23 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -IF(WINDOWS) - SET(EXPATHOME $ENV{EXPATHOME}) - FIND_LIBRARY(EXPAT_LIB libexpat HINTS ${EXPATHOME}/bin ${EXPATHOME}/Bin) - FIND_PATH(EXPAT_INCLUDE_DIR expat.h PATHS ${EXPATHOME}/include ${EXPATHOME}/Source/lib) -ELSE(WINDOWS) - FIND_LIBRARY(EXPAT_LIB expat) -ENDIF(WINDOWS) +SET(_m4_data + ac_cxx_option.m4 + ac_linker_options.m4 + ac_pkg_swig.m4 + ac_python_devel.m4 + check_boost.m4 + check_cas.m4 + check_cppunit.m4 + check_expat.m4 + check_htmlgen.m4 + check_libxml.m4 + check_omniorb.m4 + check_salome.m4 + check_sphinx.m4 + i2_check_qt4.m4 + production.m4 + thread.m4 + ) -IF(EXPAT_INCLUDE_DIR) - SET(EXPAT_INCLUDES -I${EXPAT_INCLUDE_DIR}) -ENDIF(EXPAT_INCLUDE_DIR) -SET(EXPAT_LIBS ${EXPAT_LIB}) +INSTALL(FILES ${_m4_data} DESTINATION ${SALOME_INSTALL_AMCONFIG_LOCAL}/config_files) diff --git a/adm/unix/make_begin.am b/adm/unix/make_begin.am deleted file mode 100755 index 0120ca459..000000000 --- a/adm/unix/make_begin.am +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -## -# Here any commonly used variables can be defined -## - -# Standard directory for installation -salomeincludedir = $(includedir)/salome -libdir = $(prefix)/lib/salome -bindir = $(prefix)/bin/salome -salomescriptdir = $(bindir) -salomepythondir = $(pythondir)/salome -salomepyexecdir = $(pyexecdir)/salome - -# Directory for installing idl files -salomeidldir = $(prefix)/idl/salome - -# Directory for installing resource files -salomeresdir = $(prefix)/share/salome/resources/@MODULE_NAME@ - -# Directories for installing admin files -admlocaldir = $(prefix)/adm_local -admlocalunixdir = $(admlocaldir)/unix -admlocalm4dir = $(admlocaldir)/unix/config_files - -# Shared modules installation directory -sharedpkgpythondir =$(salomepythondir)/shared_modules - -# Documentation directory -docdir = $(datadir)/doc/salome - -# translation (*.qm) files generation (lrelease) -%.qm: resources/%.ts - $(QT_DIR)/bin/lrelease $< -qm $@ diff --git a/adm/unix/make_end.am b/adm/unix/make_end.am deleted file mode 100755 index d04292ad4..000000000 --- a/adm/unix/make_end.am +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -SUFFIXES = - -# -------------------------------------------- -# *.i --> *wrap.cxx -# -------------------------------------------- - -SUFFIXES += .i WRAP.cxx .idl .hh SK.cc _idl.py - -.iWRAP.cxx : - $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) $(MYSWIG_FLAGS) -o $@ $< - -%SK.cc %.hh:%.idl - $(OMNIORB_IDL) $(OMNIORB_IDLCXXFLAGS) $(IDLCXXFLAGS) -bcxx $< - -.idl_idl.py: - $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) $(IDLPYFLAGS) $< - -# -------------------------------------------- -# *.h --> *_moc.cxx -# -------------------------------------------- - -SUFFIXES += .h _moc.cxx - -.h_moc.cxx : - $(MOC) -p . -o $@ $< - -clean-local-h2Moc : - rm -f *_moc.cxx - -# -------------------------------------------- -# *.ui --> *.h -# -------------------------------------------- - -SUFFIXES += .ui .h - -.ui.h : - $(UIC) -o $@ $< - -clean-local-ui2h : - for Header in $(patsubst %.ui,%.h,$(wildcard *.ui)) ; do \ - rm -f $$Header ; \ - done ; - -# -------------------------------------------- -# *.ui --> *.cxx -# -------------------------------------------- - -SUFFIXES += .ui .cxx - -.ui.cxx : - $(UIC) -o $@ -impl $(patsubst %.cxx,%.h,$@) $< - -clean-local-ui2cxx : - for Impl in $(patsubst %.ui,%.cxx,$(wildcard *.ui)) ; do \ - rm -f $$Impl ; \ - done ; - -# -------------------------------------------- -# *.po --> *.qm -# -------------------------------------------- - -SUFFIXES += .po .qm - -.po.qm : - subdir=`dirname $@` ; \ - if ! test -d $$subdir; then \ - mkdir -p $$subdir ; \ - fi ; \ - $(MSG2QM) $< $@ - -clean-local-po2qm : - rm -f *.qm - -clean-local : clean-local-h2Moc clean-local-po2qm clean-local-ui2cxx clean-local-ui2h diff --git a/build_cmake.bat b/build_cmake.bat deleted file mode 100644 index 2571b409e..000000000 --- a/build_cmake.bat +++ /dev/null @@ -1,20 +0,0 @@ -@REM Copyright (C) 2006-2013 CEA/DEN, EDF R&D -@REM -@REM This library is free software; you can redistribute it and/or -@REM modify it under the terms of the GNU Lesser General Public -@REM License as published by the Free Software Foundation; either -@REM version 2.1 of the License. -@REM -@REM This library is distributed in the hope that it will be useful, -@REM but WITHOUT ANY WARRANTY; without even the implied warranty of -@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -@REM Lesser General Public License for more details. -@REM -@REM You should have received a copy of the GNU Lesser General Public -@REM License along with this library; if not, write to the Free Software -@REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -@REM -@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -@REM - -%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --yacs diff --git a/build_configure b/build_configure deleted file mode 100755 index eb54793e6..000000000 --- a/build_configure +++ /dev/null @@ -1,55 +0,0 @@ -#! /bin/sh -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# -- -# -- -# -ORIG_DIR=`pwd` -run() { - local logfile=$ORIG_DIR/build_configure.log - printf "%-50s" "$1 ... " - eval $1 > $logfile 2>&1 - if test $? != 0 ; then - echo "[FAILED]" - echo "see file build_configure.log ..." - exit 1 - fi - echo "[ OK ]" -} - -# -- -# -- goto build_configure dir -CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` -cd ${CONF_DIR} - -# -- -# -- configure.in construction -rm -f configure.in -touch configure.in - -cat configure.in.base >> configure.in - -# -- - -run "aclocal -I adm/unix/config_files" -run "libtoolize --force --copy --automake" -run "autoheader -I adm/unix/config_files" -run "autoconf" -run "automake --add-missing --copy" diff --git a/clean_configure b/clean_configure deleted file mode 100755 index c1d95da51..000000000 --- a/clean_configure +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` -cd ${CONF_DIR} - -TO_CLEAN= -TO_CLEAN=${TO_CLEAN}' build_configure.log' -TO_CLEAN=${TO_CLEAN}' Makefile.am.list' -TO_CLEAN=${TO_CLEAN}' aclocal.m4' -TO_CLEAN=${TO_CLEAN}' autom4te*' -TO_CLEAN=${TO_CLEAN}' configure' -TO_CLEAN=${TO_CLEAN}' configure.in' -TO_CLEAN=${TO_CLEAN}' yacs_config.h.in' - -rm -rf $TO_CLEAN > /dev/null - -find . -name "Makefile.in" -exec rm -f {} \; -find . -name "*~" -exec rm -f {} \; -find . -name "semantic.cache" -exec rm {} \; -find . -name "*.pyc" -exec rm {} \; -rm -f src/salomegui_swig/doc.i -( cd adm/unix/config_files && rm -f l*.m4 config.guess config.sub depcomp install-sh ltmain.sh missing py-compile ) diff --git a/configure.in.base b/configure.in.base deleted file mode 100644 index 85ef94023..000000000 --- a/configure.in.base +++ /dev/null @@ -1,213 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# -- -# Author : Anthony Geay (CEA) -# -- -# ----------------------------------------------------------------------------- -# -AC_INIT([Salome2 Project], [7.2.0], [paul.rascle@edf.fr], [SalomeYacs]) -AC_CONFIG_AUX_DIR(adm/unix/config_files) -AM_INIT_AUTOMAKE([tar-pax]) -AC_CONFIG_HEADER(yacs_config.h) - -# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.) -MODULE_NAME=yacs -AC_SUBST(MODULE_NAME) - -SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'` -AC_SUBST(SHORT_VERSION) -XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'` -AC_SUBST(XVERSION) -VERSION_DEV=0 -AC_SUBST(VERSION_DEV) - -RELEASE=$VERSION -AC_SUBST(RELEASE) - -# This function return on stdout the absolute path of the filename in -# argument. Exemple: -# $ filename="../KERNEL_SRC/configure -# $ absfilename=`absolute_path $filename` -function absolute_path { - filename=$1 - here=`pwd` - apath=`dirname $filename` - cd $apath - apath=`pwd` - cd $here - echo $apath -} - -# Build directory, where the configure script is executed. -ROOT_BUILDDIR=`pwd` -# Source directory, where the configure script is located. -ROOT_SRCDIR=`absolute_path $0` - -AC_SUBST(ROOT_SRCDIR) -AC_SUBST(ROOT_BUILDDIR) - -echo -echo Source root directory : $ROOT_SRCDIR -echo Build root directory : $ROOT_BUILDDIR - -# ----------------------------------------------------------------------------- - -AC_ENABLE_DEBUG(yes) -AC_DISABLE_PRODUCTION - -#Linker options -AC_CANONICAL_BUILD -AC_LINKER_OPTIONS - -#Mandatory products -AC_PROG_CXX -AM_PROG_LIBTOOL - -AC_CHECK_LIB(dl,dlopen) - -ENABLE_PTHREADS - -AM_PATH_PYTHON(2.3) -AC_PYTHON_DEVEL -python_ok=yes -CHECK_THREAD -AC_CHECK_OMNIORB -AC_CHECK_EXPAT -AC_CHECK_LIBXML -CHECK_BOOST - -#Optional products -AC_PROG_SWIG(1.3.17) -SWIG_ENABLE_CXX -SWIG_PYTHON -CHECK_CPPUNIT -AC_CHECK_KERNEL -#CHECK_MSG2QM -CHECK_HTML_GENERATORS -CHECK_SPHINX - -CHECK_GUI(SALOME_Session_Server,SALOME_Session_Server) - -I2_CHECK_QT4 -I2_CHECK_QSCINTILLA - -AM_CONDITIONAL([PYTHON_API], [test "x$swig_ok" == "xyes"]) -AM_CONDITIONAL([SALOME_KERNEL], [test "x$KERNEL_ROOT_DIR" != "x"]) -AM_CONDITIONAL([DSC_PORTS], [test -f $KERNEL_ROOT_DIR/idl/salome/DSC_Engines.idl]) - -AM_CONDITIONAL(WINDOWS, [ test ]) - -echo -echo -echo -echo "------------------------------------------------------------------------" -echo "$PACKAGE $VERSION" -echo "------------------------------------------------------------------------" -echo -echo "Configuration Options Summary:" -echo -echo "Mandatory products:" -echo " Threads ................ : $thread_ok" -echo " Boost .................. : $boost_ok" -echo " OmniOrb (CORBA) ........ : $omniORB_ok" -echo " OmniOrbpy (CORBA) ...... : $omniORBpy_ok" -echo " Python ................. : $python_ok" -echo " Expat .................. : $expat_ok" -echo " libxml ................. : $libxml_ok" -echo -echo "Optional products:" -echo " swig (python wrapper)... : $swig_ok" -echo " SALOME KERNEL .......... : $Kernel_ok" -echo " DSC extension .......... : $dsc_ok" -echo " Cppunit (make check).... : $cppunit_ok" -echo " Qt4 (graphic interface) : $qt_ok" -echo " QScintilla ............. : $qscintilla_ok" -#echo " msq2qm ................. : $msg2qm_ok" -echo " SALOME GUI ............. : $SalomeGUI_ok" -echo " Sphinx (user doc) ...... : $sphinx_ok" -echo -echo "------------------------------------------------------------------------" -echo - -if test "x$thread_ok" = "xno"; then - AC_MSG_ERROR([Thread is required],1) -fi -if test "x$omniORB_ok" = "xno"; then - AC_MSG_ERROR([OmniOrb is required],1) -fi -if test "x$python_ok" = "xno"; then - AC_MSG_ERROR([Python is required],1) -fi -if test "x$omniORBpy_ok" = "xno"; then - AC_MSG_ERROR([OmniOrbpy is required],1) -fi -if test "x$expat_ok" = "xno"; then - AC_MSG_ERROR([Expat is required],1) -fi -if test "x$libxml_ok" = "xno"; then - AC_MSG_ERROR([Libxml is required],1) -fi - - -AC_OUTPUT([ \ - Makefile \ - YACS_version.h \ - Demo/Makefile \ - doc/Makefile \ - idl/Makefile \ - src/Makefile \ - src/bases/Makefile \ - src/bases/Test/Makefile \ - src/engine/Makefile \ - src/engine/Plugin/Makefile \ - src/engine/Test/Makefile \ - src/engine_swig/Makefile \ - src/hmi/Makefile \ - src/pyqt/Makefile \ - src/runtime/Makefile \ - src/runtime/Test/Makefile \ - src/runtime_swig/Makefile \ - src/genericgui/Makefile \ - src/salomewrap/Makefile \ - src/salomegui/Makefile \ - src/salomegui_swig/Makefile \ - src/salomeloader/Makefile \ - src/salomeloader/testSalomeLoader.py \ - src/wrappergen/Makefile \ - src/wrappergen/src/Makefile \ - src/yacsloader/Makefile \ - src/yacsloader/Test/Makefile \ - src/yacsloader/Test/YacsLoaderTest.sh \ - src/yacsloader/Test/YacsLoaderInSessionTest.sh \ - src/yacsloader/Test/display.sh \ - src/yacsloader/Test/config_appli.xml \ - src/yacsloader_swig/Makefile \ - src/yacsloader_swig/Test/Makefile \ - src/yacsloader_swig/Test/YacsLoaderTest.sh \ - src/yacsloader_swig/Test/YacsLoaderInSessionTest.sh \ - src/yacsloader_swig/Test/config_appli.xml \ - src/yacsorb/Makefile \ - src/salomegui/resources/YACSCatalog.xml \ - src/salomegui/resources/SalomeApp.xml \ - doc/Doxyfile \ - doc/conf.py \ - doc/sources/header.html \ -]) - diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 000000000..23d05662e --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,109 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +SET(top_builddir ${CMAKE_BINARY_DIR}) +SET(top_srcdir ${CMAKE_SOURCE_DIR}) +SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) +SET(builddir ${CMAKE_CURRENT_BINARY_DIR}) +SET(datadir ${CMAKE_INSTALL_PREFIX}/share) +SET(docdir ${datadir}/doc/salome) +SET(yacsdocdir ${docdir}/gui/YACS) +SET(yacsdevdocdir ${docdir}/tui/YACS) + +SET(RSTFILES + accesCorba.rst + accesLocal.rst + advancepy.rst + annexe_common.rst + batch.rst + calcium.rst + calciumyacs.rst + calciumapi.rst + calciummod.rst + calculator.rst + compInterne.rst + components.rst + console.rst + cppsalome.rst + dataflow.rst + etapes.rst + execpy.rst + execution.rst + execxml.rst + gui_components.rst + gui.rst + hxx2salome.rst + index.rst + integration.rst + using.rst + main_menu.rst + modification.rst + operations.rst + principes.rst + progdsc.rst + pysalome.rst + python.rst + rappels.rst + references.rst + representation.rst + salome.rst + schemapy.rst + schemaxml.rst + scratch.rst + toolbars.rst + optimizer.rst + yacsgen.rst + ) + +SET(SPHINXOPTS ) +SET(SOURCEDIR ${srcdir}) +SET(PAPEROPT_a4 -D latex_paper_size=a4) +SET(ALLSPHINXOPTS -d doctrees ${PAPEROPT_a4} ${SPHINXOPTS} ${SOURCEDIR}) + +SALOME_CONFIGURE_FILE(Doxyfile.in Doxyfile) +SALOME_CONFIGURE_FILE(conf.py.in conf.py) +SALOME_CONFIGURE_FILE(sources/header.html.in sources/header.html) + +# install user's documentation +ADD_CUSTOM_TARGET(htm + COMMAND mkdir -p html doctrees + COMMAND ${SPHINX_EXECUTABLE} -c ${top_builddir}/doc -b html ${ALLSPHINXOPTS} html + DEPENDS ${RSTFILES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) +INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target htm)") +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ + DESTINATION ${yacsdocdir} + USE_SOURCE_PERMISSIONS + PATTERN ".buildinfo" EXCLUDE + ) + +# install developer's documentation +ADD_CUSTOM_TARGET(dev_docs + COMMAND ${DOXYGEN_EXECUTABLE} -u + COMMAND ${DOXYGEN_EXECUTABLE} + COMMAND mkdir -p ${yacsdevdocdir} + COMMAND cp -fv ${srcdir}/images/head.png ${yacsdevdocdir}/head.png + COMMAND find "${builddir}/htmldev" -name \"*.*\" -exec cp -rfv {} ${yacsdevdocdir} '\;' + COMMAND cp -rfv ${top_srcdir}/src/yacsloader/samples ${yacsdevdocdir} + COMMAND rm -rf ${yacsdevdocdir}/samples/CVS + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index 366bad350..000000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -.PHONY : latex - -if SPHINX_IS_OK - -yacsdoc_DATA=html/index.html -html/index.html:$(RSTFILES) - make htm - -endif - -dev_docs: build_dev_docs install_dev_docs - -build_dev_docs: - doxygen - -DOXFILES= ref/bases.dox ref/engine.dox ref/hmi.dox ref/python.dox ref/runtime.dox ref/yacs.dox ref/yacsloader.dox - -EXTRA_DIST= _static exemples $(DOXFILES) sources/salome_extra.css sources/footer.html - -yacsdocdir=$(docdir)/gui/YACS -yacsdevdocdir=$(docdir)/tui/YACS -yacsdevdoc_DATA = images/head.png - -SPHINXOPTS = -SOURCEDIR = $(srcdir) -SPHINXBUILD = sphinx-build -PAPEROPT_a4 = -D latex_paper_size=a4 -ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR) - -htm: - mkdir -p html doctrees - $(SPHINXBUILD) -c $(top_builddir)/doc -b html $(ALLSPHINXOPTS) html - @echo - @echo "Build finished. The HTML pages are in html." - -latex: - mkdir -p latex doctrees - $(SPHINXBUILD) -c $(top_builddir)/doc -b latex $(ALLSPHINXOPTS) latex - @echo "Running LaTeX files through pdflatex..." - make -C latex all-pdf - @echo "pdflatex finished; the PDF files are in latex." - -pdf: - $(SPHINXBUILD) -c $(top_builddir)/doc -b pdf $(ALLSPHINXOPTS) pdf - @echo - @echo "Build finished. The pdf documents are in pdf." - -html: - mkdir -p $@ - -htmldev: - mkdir -p $@ - -RSTFILES= \ -accesCorba.rst \ -accesLocal.rst \ -advancepy.rst \ -annexe_common.rst \ -batch.rst \ -calcium.rst \ -calciumyacs.rst \ -calciumapi.rst \ -calciummod.rst \ -calculator.rst \ -compInterne.rst \ -components.rst \ -console.rst \ -cppsalome.rst \ -dataflow.rst \ -etapes.rst \ -execpy.rst \ -execution.rst \ -execxml.rst \ -gui_components.rst \ -gui.rst \ -hxx2salome.rst \ -index.rst \ -integration.rst \ -using.rst \ -main_menu.rst \ -modification.rst \ -operations.rst \ -principes.rst \ -progdsc.rst \ -pysalome.rst \ -python.rst \ -rappels.rst \ -references.rst \ -representation.rst \ -salome.rst \ -schemapy.rst \ -schemaxml.rst \ -scratch.rst \ -toolbars.rst \ -optimizer.rst \ -yacsgen.rst - - -EXTRA_DIST+= $(RSTFILES) images - -EXTRA_DIST+= \ -ref/classDiagram.png \ -ref/createNodeCollaboration.png \ -opml.dtd \ -opml.xslt \ -ref/programingRules.sxw \ -ref/schema.jpeg \ -ref/sequenceCreateNode.png \ -ref/undoCreateNodeCollaboration.png - -install-data-local: - $(INSTALL) -d $(DESTDIR)$(yacsdocdir) - if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ - cp -rf $$b"html"/* $(DESTDIR)$(yacsdocdir) ; \ - if test -f $$b"latex"/using.pdf; then cp -f $$b"latex"/using.pdf $(DESTDIR)$(yacsdocdir) ; fi; \ - if test -f $$b"latex"/integration.pdf; then cp -f $$b"latex"/integration.pdf $(DESTDIR)$(yacsdocdir) ; fi; - -install_dev_docs: - $(INSTALL) -d $(DESTDIR)$(yacsdevdocdir) - if test -d "htmldev"; then b=; else b="$(srcdir)/"; fi; \ - find $$b"htmldev" -name "*.*" -exec cp -rf {} $(DESTDIR)$(yacsdevdocdir) ';' ; \ - cp -rf $(top_srcdir)/src/yacsloader/samples $(DESTDIR)$(yacsdevdocdir); \ - rm -rf $(DESTDIR)$(yacsdevdocdir)/samples/CVS; - -uninstall-local: - chmod -R +w $(DESTDIR)$(yacsdocdir) - rm -rf $(DESTDIR)$(yacsdocdir)/* - -clean-local: - -rm -rf html latex doctrees - if test -d "html"; then rm -rf html ; fi - -dist-hook: - if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ - if test -d $$b"html"; then cp -rf $$b"html" $(distdir) ; fi; \ - if test -d "htmldev"; then b=; else b="$(srcdir)/"; fi; \ - if test -d $$b"htmldev"; then cp -rf $$b"htmldev" $(distdir) ; fi diff --git a/doc/sources/header.html.in b/doc/sources/header.html.in index cd9329091..03930d21e 100644 --- a/doc/sources/header.html.in +++ b/doc/sources/header.html.in @@ -19,5 +19,5 @@ $extrastylesheet
-
Version: @VERSION@
+
Version: @SALOMEYACS_VERSION@
diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt new file mode 100644 index 000000000..ccf13f73c --- /dev/null +++ b/idl/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(UseOmniORB) + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) +ENDIF(SALOME_YACS_USE_KERNEL) + +INCLUDE_DIRECTORIES( + ${SALOME_INCL_PATH} + ${OMNIORB_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +IF(WINDOWS) + ADD_DEFINITIONS(-DNOGDI) +ENDIF(WINDOWS) + + +SET(SalomeIDLYACS_IDLSOURCES + yacsgui.idl +) + +SET(IDL_INCLUDE_DIRS + ${KERNEL_ROOT_DIR}/idl/salome + ${CMAKE_CURRENT_SOURCE_DIR} +) +SET(IDL_LINK_FLAGS + ${KERNEL_SalomeIDLKernel} +) + +OMNIORB_ADD_MODULE(SalomeIDLYACS "${SalomeIDLYACS_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" "${IDL_LINK_FLAGS}") +INSTALL(TARGETS SalomeIDLYACS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/idl/Makefile.am b/idl/Makefile.am deleted file mode 100644 index 02ac86138..000000000 --- a/idl/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -IDL_FILES = yacsgui.idl -IDL_SRC = yacsguiSK.cc -BUILT_SOURCES = $(IDL_SRC) yacsgui.hh - -IDLCXXFLAGS = -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GUI_ROOT_DIR)/idl/salome - -IDLPYFLAGS = -I$(KERNEL_ROOT_DIR)/idl/salome - -EXTRA_DIST = $(IDL_FILES) - -lib_LTLIBRARIES = libSalomeIDLYACS.la - -libSalomeIDLYACS_la_SOURCES = $(IDL_SRC) - -libSalomeIDLYACS_la_LIBADD = \ - $(OMNIORB_LIBS) - -libSalomeIDLYACS_la_CXXFLAGS = \ - $(OMNIORB_INCLUDES) \ - -I$(KERNEL_ROOT_DIR)/include/salome \ - $(OMNIORB_CXXFLAGS) - -install-exec-local: install-pyidl - -uninstall-local: - rm -rf $(DESTDIR)$(salomepythondir)/yacsgui_idl.py - rm -rf $(DESTDIR)$(salomepythondir)/YACS_ORB - rm -rf $(DESTDIR)$(salomepythondir)/YACS_ORB__POA - -install-pyidl: $(IDL_FILES) - $(INSTALL) -d $(DESTDIR)$(salomepythondir) - @for file in $^ dummy; do \ - if [ $$file != "dummy" ]; then \ - $(OMNIORB_IDL) -bpython $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \ - fi ; \ - done ; - -dist-hook: - rm -f $(distdir)/yacsguiSK.cc - rm -f $(distdir)/yacsgui.hh - -clean-local: - rm -rf YACS_ORB YACS_ORB__POA yacsgui.hh yacsgui_idl.py yacsguiSK.cc - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100755 index 000000000..a019b4265 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +## +# Common packages +## +SET(SUBDIRS_COMMON + bases engine runtime wrappergen yacsloader yacsorb salomeloader + ) + +## +# SWIG wrapping +## +IF(SALOME_YACS_USE_SWIG) + LIST(APPEND SUBDIRS_COMMON + engine_swig runtime_swig yacsloader_swig + ) +ENDIF() + +## +# GUI +## +IF(SALOME_BUILD_GUI) + SET(SUBDIRS_GUI + pyqt hmi salomewrap genericgui salomegui + ) + IF(SALOME_YACS_USE_SWIG) + LIST(APPEND SUBDIRS_GUI + salomegui_swig + ) + ENDIF() +ENDIF() + +SET(SUBDIRS + ${SUBDIRS_COMMON} + ${SUBDIRS_GUI} +) + +FOREACH(dir ${SUBDIRS}) + ADD_SUBDIRECTORY(${dir}) +ENDFOREACH(dir ${SUBDIRS}) diff --git a/src/bases/CMakeLists.txt b/src/bases/CMakeLists.txt new file mode 100644 index 000000000..51e0f8480 --- /dev/null +++ b/src/bases/CMakeLists.txt @@ -0,0 +1,85 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(SALOME_BUILD_TESTS) + ADD_SUBDIRECTORY( Test ) +ENDIF(SALOME_BUILD_TESTS) + +# --- options --- + +# additional include directories +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIR} + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + "-DYACS_PTHREAD" + ) + +# libraries to link to +SET(_link_LIBRARIES + ${PTHREAD_LIBRARIES} + ${PLATFORM_LIBS} + ) + +# --- headers --- + +SET(YACSBases_HEADERS + YACSBasesExport.hxx + Cstr2d.hxx + define.hxx + DynLibLoaderGNU.hxx + DynLibLoader.hxx + DynLibLoaderWin.hxx + Exception.hxx + Mutex.hxx + MutexPT.hxx + Semaphore.hxx + SemaphorePT.hxx + Thread.hxx + ThreadPT.hxx + AlternateThread.hxx + AlternateThreadPT.hxx + YacsTrace.hxx + yacsconfig.h + chrono.hxx + ) + +# --- sources --- + +SET(YACSBases_SOURCES + Exception.cxx + Thread.cxx + AlternateThread.cxx + Mutex.cxx + Semaphore.cxx + DynLibLoader.cxx + Cstr2d.cxx + YacsTrace.cxx + chrono.cxx + ) + +# --- rules --- + +ADD_LIBRARY(YACSBases ${YACSBases_SOURCES}) +TARGET_LINK_LIBRARIES(YACSBases ${_link_LIBRARIES}) +INSTALL(TARGETS YACSBases EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +INSTALL(FILES ${YACSBases_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/bases/Makefile.am b/src/bases/Makefile.am deleted file mode 100644 index e02ccf792..000000000 --- a/src/bases/Makefile.am +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -SUBDIRS = Test - -noinst_LTLIBRARIES = libYACSBases.la - -libYACSBases_la_SOURCES = \ - Exception.cxx Thread.cxx AlternateThread.cxx \ - Mutex.cxx Semaphore.cxx DynLibLoader.cxx \ - Cstr2d.cxx YacsTrace.cxx chrono.cxx \ - $(__dummy__) - -EXTRA_libYACSBases_la_SOURCES = \ - Thread.hxx ThreadPT.hxx ThreadPT.cxx \ - AlternateThread.hxx AlternateThreadPT.hxx \ - AlternateThreadPT.cxx \ - Mutex.hxx MutexPT.cxx MutexPT.hxx \ - Semaphore.hxx SemaphorePT.cxx SemaphorePT.hxx \ - DynLibLoader.hxx Exception.hxx chrono.hxx \ - $(__dummy__) - -if WINDOWS -EXTRA_libYACSBases_la_SOURCES += DynLibLoaderWin.hxx -else -EXTRA_libYACSBases_la_SOURCES += DynLibLoaderGNU.hxx -endif - -libYACSBases_la_LIBADD = $(PTHREAD_LIBS) - -salomeinclude_HEADERS = \ - YACSBasesExport.hxx \ - Cstr2d.hxx \ - define.hxx \ - DynLibLoaderGNU.hxx \ - DynLibLoader.hxx \ - DynLibLoaderWin.hxx \ - Exception.hxx \ - Mutex.hxx \ - MutexPT.hxx \ - Semaphore.hxx \ - SemaphorePT.hxx \ - Thread.hxx \ - ThreadPT.hxx \ - AlternateThread.hxx \ - AlternateThreadPT.hxx \ - YacsTrace.hxx \ - yacsconfig.h \ - chrono.hxx \ - $(__dummy__) - -AM_CXXFLAGS = $(THREAD_DEF) - -EXTRA_DIST=ThreadPT.cxx AlternateThreadPT.cxx MutexPT.cxx \ - SemaphorePT.cxx DynLibLoaderGNU.cxx - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/bases/Test/CMakeLists.txt b/src/bases/Test/CMakeLists.txt new file mode 100644 index 000000000..ee8911343 --- /dev/null +++ b/src/bases/Test/CMakeLists.txt @@ -0,0 +1,49 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# --- options --- + +# additional include directories +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIR} + ${CPPUNIT_INCLUDE_DIRS} + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${CPPUNIT_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + ${CPPUNIT_LIBRARIES} + YACSBases + ) + +# --- sources --- + +SET(YACSDLTest_SOURCES + DLTest.cxx + ) + +# --- rules --- + +ADD_LIBRARY(YACSDLTest ${YACSDLTest_SOURCES}) +TARGET_LINK_LIBRARIES(YACSDLTest ${_link_LIBRARIES}) +INSTALL(TARGETS YACSDLTest EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/bases/Test/Makefile.am b/src/bases/Test/Makefile.am deleted file mode 100644 index c7812808a..000000000 --- a/src/bases/Test/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -AM_CXXFLAGS = $(THREAD_DEF) -I$(srcdir)/.. - -check_PROGRAMS = InitTests -if CPPUNIT_IS_OK -check_PROGRAMS += TestBases -endif - -lib_LTLIBRARIES = libYACSDLTest.la - -libYACSDLTest_la_SOURCES = DLTest.cxx - -libYACSDLTest_la_CXXFLAGS = $(THREAD_DEF) - -InitTests_SOURCES = InitTests.cxx - -InitTests__CXXFLAGS = -I$(srcdir)/.. - -TestBases_SOURCES = \ - TestBases.cxx \ - basesTest.cxx - -TestBases_LDADD = ../libYACSBases.la - -TestBases_LDFLAGS = $(CPPUNIT_LIBS) -pthread -ldl - -TestBases_CXXFLAGS = $(THREAD_DEF) $(CPPUNIT_INCLUDES) -I$(srcdir)/.. - -TESTS = InitTests -if CPPUNIT_IS_OK -TESTS += TestBases -endif - -EXTRA_DIST = BasicMainTest.hxx basesTest.hxx UnitTestsResult.hxx - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt new file mode 100644 index 000000000..5b8fa5853 --- /dev/null +++ b/src/engine/CMakeLists.txt @@ -0,0 +1,178 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(SALOME_BUILD_TESTS) +#TODO: ADD_SUBDIRECTORY( Plugin Test ) +ENDIF(SALOME_BUILD_TESTS) + +# --- options --- + +# additional include directories +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIR} + ${PROJECT_SOURCE_DIR}/src/bases + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ) + +# libraries to link to +SET(_link_LIBRARIES + ${PTHREAD_LIBRARIES} + YACSBases + ) + +# --- headers --- + +SET(YACSlibEngine_HEADERS + YACSlibEngineExport.hxx + Any.hxx + AnyInputPort.hxx + Bloc.hxx + Catalog.hxx + ComponentDefinition.hxx + ComponentInstance.hxx + ComposedNode.hxx + ConditionInputPort.hxx + Container.hxx + ConversionException.hxx + DataFlowPort.hxx + DataNode.hxx + DataPort.hxx + DataStreamPort.hxx + DeploymentTree.hxx + Dispatcher.hxx + DynParaLoop.hxx + ElementaryNode.hxx + Executor.hxx + ForEachLoop.hxx + ForLoop.hxx + InGate.hxx + InlineNode.hxx + InPort.hxx + InputDataStreamPort.hxx + InputPort.hxx + InvalidExtractionException.hxx + LinkInfo.hxx + Logger.hxx + LogRecord.hxx + Loop.hxx + Node.hxx + OptimizerAlg.hxx + OptimizerLoop.hxx + OutGate.hxx + OutPort.hxx + OutputDataStreamPort.hxx + OutputPort.hxx + Pool.hxx + Port.hxx + Proc.hxx + RefCounter.hxx + Runtime.hxx + Scheduler.hxx + ServiceInlineNode.hxx + ServiceNode.hxx + SharedPtr.hxx + StaticDefinedComposedNode.hxx + Switch.hxx + Task.hxx + TypeCode.hxx + Visitor.hxx + VisitorSaveSchema.hxx + VisitorSaveState.hxx + WhileLoop.hxx + PropertyInterface.hxx + AnyOutputPort.hxx + ServerNode.hxx + InPropertyPort.hxx + ) + +# --- sources --- + +SET(YACSlibEngine_SOURCES + PropertyInterface.cxx + TypeCode.cxx + RefCounter.cxx + LinkInfo.cxx + ConversionException.cxx + InvalidExtractionException.cxx + ConditionInputPort.cxx + AnyInputPort.cxx + AnyOutputPort.cxx + Port.cxx InGate.cxx + OutGate.cxx + DataPort.cxx + DataFlowPort.cxx + InPort.cxx + OutPort.cxx + InputPort.cxx + OutputPort.cxx + DataStreamPort.cxx + InputDataStreamPort.cxx + OutputDataStreamPort.cxx + Any.cxx + Pool.cxx + Node.cxx + ElementaryNode.cxx + ComposedNode.cxx + InlineNode.cxx + ServiceNode.cxx + ServerNode.cxx + ServiceInlineNode.cxx + StaticDefinedComposedNode.cxx + Bloc.cxx + Proc.cxx + Loop.cxx + ForLoop.cxx + WhileLoop.cxx + Switch.cxx + DynParaLoop.cxx + ForEachLoop.cxx + OptimizerAlg.cxx + OptimizerLoop.cxx + Runtime.cxx + Scheduler.hxx + Task.hxx + Executor.cxx + Visitor.cxx + VisitorSaveState.cxx + VisitorSaveSchema.cxx + ComponentInstance.cxx + Dispatcher.cxx + Container.cxx + DeploymentTree.cxx + Logger.cxx + LogRecord.cxx + Catalog.cxx + ComponentDefinition.cxx + DataNode.cxx + Task.cxx + Scheduler.cxx + InPropertyPort.cxx + ) + +# --- rules --- + +ADD_LIBRARY(YACSlibEngine ${YACSlibEngine_SOURCES}) +TARGET_LINK_LIBRARIES(YACSlibEngine ${_link_LIBRARIES}) +INSTALL(TARGETS YACSlibEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +INSTALL(FILES ${YACSlibEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/engine/Makefile.am b/src/engine/Makefile.am deleted file mode 100644 index c0eb58161..000000000 --- a/src/engine/Makefile.am +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -SUBDIRS = . Plugin Test - -lib_LTLIBRARIES = libYACSlibEngine.la - -libYACSlibEngine_la_SOURCES = \ - PropertyInterface.cxx \ - TypeCode.cxx \ - RefCounter.cxx \ - LinkInfo.cxx \ - ConversionException.cxx \ - InvalidExtractionException.cxx \ - ConditionInputPort.cxx \ - AnyInputPort.cxx \ - AnyOutputPort.cxx \ - Port.cxx InGate.cxx \ - OutGate.cxx \ - DataPort.cxx \ - DataFlowPort.cxx \ - InPort.cxx \ - OutPort.cxx \ - InputPort.cxx \ - OutputPort.cxx \ - DataStreamPort.cxx \ - InputDataStreamPort.cxx \ - OutputDataStreamPort.cxx \ - Any.cxx \ - Pool.cxx \ - Node.cxx \ - ElementaryNode.cxx \ - ComposedNode.cxx \ - InlineNode.cxx \ - ServiceNode.cxx \ - ServerNode.cxx \ - ServiceInlineNode.cxx \ - StaticDefinedComposedNode.cxx \ - Bloc.cxx \ - Proc.cxx \ - Loop.cxx \ - ForLoop.cxx \ - WhileLoop.cxx \ - Switch.cxx \ - DynParaLoop.cxx \ - ForEachLoop.cxx \ - OptimizerAlg.cxx \ - OptimizerLoop.cxx \ - Runtime.cxx \ - Scheduler.hxx \ - Task.hxx \ - Executor.cxx \ - Visitor.cxx \ - VisitorSaveState.cxx \ - VisitorSaveSchema.cxx \ - ComponentInstance.cxx \ - Dispatcher.cxx \ - Container.cxx \ - DeploymentTree.cxx \ - Logger.cxx \ - LogRecord.cxx \ - Catalog.cxx \ - ComponentDefinition.cxx \ - DataNode.cxx \ - Task.cxx \ - Scheduler.cxx \ - InPropertyPort.cxx \ - $(__dummy__) - -salomeinclude_HEADERS = \ -YACSlibEngineExport.hxx \ -Any.hxx AnyInputPort.hxx Bloc.hxx Catalog.hxx ComponentDefinition.hxx \ -ComponentInstance.hxx ComposedNode.hxx ConditionInputPort.hxx Container.hxx ConversionException.hxx \ -DataFlowPort.hxx DataNode.hxx DataPort.hxx DataStreamPort.hxx DeploymentTree.hxx \ -Dispatcher.hxx DynParaLoop.hxx ElementaryNode.hxx Executor.hxx \ -ForEachLoop.hxx ForLoop.hxx InGate.hxx InlineNode.hxx InPort.hxx \ -InputDataStreamPort.hxx InputPort.hxx InvalidExtractionException.hxx LinkInfo.hxx Logger.hxx \ -LogRecord.hxx Loop.hxx Node.hxx OptimizerAlg.hxx OptimizerLoop.hxx \ -OutGate.hxx OutPort.hxx OutputDataStreamPort.hxx OutputPort.hxx Pool.hxx \ -Port.hxx Proc.hxx RefCounter.hxx Runtime.hxx Scheduler.hxx \ -ServiceInlineNode.hxx ServiceNode.hxx SharedPtr.hxx StaticDefinedComposedNode.hxx Switch.hxx \ -Task.hxx TypeCode.hxx Visitor.hxx VisitorSaveSchema.hxx VisitorSaveState.hxx \ -WhileLoop.hxx PropertyInterface.hxx AnyOutputPort.hxx ServerNode.hxx InPropertyPort.hxx \ - $(__dummy__) - - -EXTRA_libYACSlibEngine_la_SOURCES = \ - $(__dummy__) - -libYACSlibEngine_la_LIBADD = ../bases/libYACSBases.la -libYACSlibEngine_la_LDFLAGS = -pthread -lpthread -ldl - -AM_CXXFLAGS = $(THREAD_DEF) \ - -I$(srcdir)/../bases - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/engine_swig/CMakeLists.txt b/src/engine_swig/CMakeLists.txt new file mode 100644 index 000000000..06332b912 --- /dev/null +++ b/src/engine_swig/CMakeLists.txt @@ -0,0 +1,166 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${SWIG_USE_FILE}) + +# --- options --- + +# additional include directories +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIR} + ${OMNIORB_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIRS} + ${PROJECT_BINARY_DIR}/idl + ${PROJECT_BINARY_DIR} + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +# swig flags +SET_SOURCE_FILES_PROPERTIES(pilot.i pypilot.i PROPERTIES + CPLUSPLUS ON + SWIG_DEFINITIONS "-shadow") +SET_PROPERTY(SOURCE pilot.i pypilot.i PROPERTY + SWIG_FLAGS "-noexcept" "-DYACS_PTHREAD") + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + -DYACS_PTHREAD + ) + +# libraries to link to +SET(_link_LIBRARIES + YACSlibEngine + ${PYTHON_LIBRARIES} + ${OMNIORB_LIBRARIES} + ) + +# --- sources --- +SET(pilot_SOURCES + ExecutorSwig.cxx + ) +# --- headers --- +SET(pilot_HEADERS + ExecutorSwig.hxx + ) +# --- sources --- +SET(pypilot_SOURCES + + ) +# --- headers --- +SET(pypilot_HEADERS + ) + +# --- scripts --- +# scripts / swig wrappings +SET(_swig_SCRIPTS + ${CMAKE_CURRENT_BINARY_DIR}/pilot.py + ${CMAKE_CURRENT_BINARY_DIR}/pypilot.py +) + +ADD_CUSTOM_TARGET(docengine.i + COMMAND DOXSRCDIR=${PROJECT_SOURCE_DIR}/src/engine ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/Doxyfile + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/doxy2swig.py -n xml/index.xml docengine.i + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + +# --- rules --- +SET(ENGINEINCLUDES + Any.hxx + DeploymentTree.hxx + InputDataStreamPort.hxx + OutPort.hxx + SharedPtr.hxx + AnyInputPort.hxx + Dispatcher.hxx + InputPort.hxx + OutputDataStreamPort.hxx + StaticDefinedComposedNode.hxx + Bloc.hxx + DynParaLoop.hxx + InvalidExtractionException.hxx + OutputPort.hxx + Switch.hxx + ComponentInstance.hxx + ElementaryNode.hxx + LinkInfo.hxx + Pool.hxx + Task.hxx + ComposedNode.hxx + Executor.hxx + Logger.hxx + Port.hxx + TypeCode.hxx + ConditionInputPort.hxx + LogRecord.hxx + Proc.hxx + Visitor.hxx + Container.hxx + ForEachLoop.hxx + Loop.hxx + RefCounter.hxx + VisitorSaveSchema.hxx + ConversionException.hxx + ForLoop.hxx + Node.hxx + Runtime.hxx + VisitorSaveState.hxx + DataFlowPort.hxx + InGate.hxx + OptimizerAlg.hxx + Scheduler.hxx + WhileLoop.hxx + DataPort.hxx + InlineNode.hxx + OptimizerLoop.hxx + ServiceInlineNode.hxx + ComponentDefinition.hxx + DataStreamPort.hxx + InPort.hxx + OutGate.hxx + ServiceNode.hxx + Catalog.hxx + PropertyInterface.hxx + AnyOutputPort.hxx + Pool.hxx + InPropertyPort.hxx +) +SET(SWIGINCLUDES ${ENGINEINCLUDES} + "${PROJECT_SOURCE_DIR}/src/bases/yacsconfig.h" + "ExecutorSwig.hxx") +SWIG_ADD_MODULE(pilot python pilot.i ExecutorSwig.cxx) +SWIG_ADD_MODULE(pypilot python pypilot.i) +ADD_DEPENDENCIES(_pilot pilot.i engtypemaps.i docengine.i ${SWIGINCLUDES}) +ADD_DEPENDENCIES(_pypilot pypilot.i pilot.i engtypemaps.i _pilot ${SWIGINCLUDES}) + +SWIG_LINK_LIBRARIES(pilot "${_link_LIBRARIES}") +SWIG_LINK_LIBRARIES(pypilot "${_link_LIBRARIES}") +IF(WINDOWS) + SET_TARGET_PROPERTIES(_pilot PROPERTIES DEBUG_OUTPUT_NAME _pilot_d) + SET_TARGET_PROPERTIES(_pypilot PROPERTIES DEBUG_OUTPUT_NAME _pypilot_d) +ENDIF(WINDOWS) + +INSTALL(TARGETS ${SWIG_MODULE_pilot_REAL_NAME} ${SWIG_MODULE_pypilot_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON}) + +SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON}) diff --git a/src/engine_swig/Makefile.am b/src/engine_swig/Makefile.am deleted file mode 100644 index ea748816e..000000000 --- a/src/engine_swig/Makefile.am +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -BUILT_SOURCES = pilotWRAP.cxx pypilotWRAP.cxx pypilotWRAP.h pilotWRAP.h - -MYSWIG_FLAGS = -noexcept -DYACS_PTHREAD -I$(srcdir)/../bases -I$(srcdir)/../engine -if DOXYGEN_IS_OK -MYSWIG_FLAGS += -DDOXYGEN_IS_OK -endif - -salomepython_PYTHON = pilot.py pypilot.py -salomepyexec_LTLIBRARIES = _pilot.la _pypilot.la - -ENGINEINCLUDES=Any.hxx DeploymentTree.hxx InputDataStreamPort.hxx OutPort.hxx SharedPtr.hxx \ -AnyInputPort.hxx Dispatcher.hxx InputPort.hxx OutputDataStreamPort.hxx StaticDefinedComposedNode.hxx \ -Bloc.hxx DynParaLoop.hxx InvalidExtractionException.hxx OutputPort.hxx Switch.hxx \ -ComponentInstance.hxx ElementaryNode.hxx LinkInfo.hxx Pool.hxx Task.hxx \ -ComposedNode.hxx Executor.hxx Logger.hxx Port.hxx TypeCode.hxx \ -ConditionInputPort.hxx LogRecord.hxx Proc.hxx Visitor.hxx \ -Container.hxx ForEachLoop.hxx Loop.hxx RefCounter.hxx VisitorSaveSchema.hxx \ -ConversionException.hxx ForLoop.hxx Node.hxx Runtime.hxx VisitorSaveState.hxx \ -DataFlowPort.hxx InGate.hxx OptimizerAlg.hxx Scheduler.hxx WhileLoop.hxx \ -DataPort.hxx InlineNode.hxx OptimizerLoop.hxx ServiceInlineNode.hxx ComponentDefinition.hxx \ -DataStreamPort.hxx InPort.hxx OutGate.hxx ServiceNode.hxx Catalog.hxx \ -PropertyInterface.hxx AnyOutputPort.hxx Pool.hxx InPropertyPort.hxx - -SWIGINCLUDES = $(ENGINEINCLUDES:%=$(top_srcdir)/src/engine/%) $(top_srcdir)/src/bases/yacsconfig.h ExecutorSwig.hxx - -pilotWRAP.cxx:pilot.i $(SWIGINCLUDES) engtypemaps.i docengine.i - $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) $(MYSWIG_FLAGS) -o pilotWRAP.cxx $(srcdir)/pilot.i - -pilot.py : pilotWRAP.cxx - -_pilot_la_SOURCES = \ - pilotWRAP.cxx \ - ExecutorSwig.cxx - - -_pilot_la_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(OMNIORB_CXXFLAGS) \ - -I$(srcdir) \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../bases - -_pilot_la_LDFLAGS = -module - -_pilot_la_LIBADD = ../engine/libYACSlibEngine.la $(OMNIORB_LIBS) $(PYTHON_LIBS) - - -pypilotWRAP.cxx: pypilot.i pilot.i $(SWIGINCLUDES) engtypemaps.i pilotWRAP.cxx - $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) $(MYSWIG_FLAGS) -o pypilotWRAP.cxx $(srcdir)/pypilot.i - -pypilotWRAP.h: pypilotWRAP.cxx -pilotWRAP.h: pilotWRAP.cxx - -pypilot.py : pypilotWRAP.cxx - -_pypilot_la_SOURCES = pypilotWRAP.cxx -_pypilot_la_CXXFLAGS = $(THREAD_DEF) $(PYTHON_CPPFLAGS) $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) -I$(srcdir)/../engine -I$(srcdir)/../bases -_pypilot_la_LDFLAGS = -module -_pypilot_la_LIBADD = ../engine/libYACSlibEngine.la $(OMNIORB_LIBS) $(PYTHON_LIBS) - -docengine.i:$(SWIGINCLUDES) - DOXSRCDIR=$(top_srcdir)/src/engine doxygen $(top_srcdir)/Misc/Doxyfile - $(PYTHON) $(top_srcdir)/Misc/doxy2swig.py -n xml/index.xml docengine.i - -EXTRA_DIST = ExecutorSwig.hxx pilot.i pypilot.i engtypemaps.i pypilotWRAP.h - -clean-local: - rm -f pypilot.py* pypilotWRAP.* pilot.py* pilotWRAP.* docengine.i - rm -rf xml - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/genericgui/CMakeLists.txt b/src/genericgui/CMakeLists.txt new file mode 100644 index 000000000..e35597970 --- /dev/null +++ b/src/genericgui/CMakeLists.txt @@ -0,0 +1,476 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIR} + ${EXPAT_INCLUDE_DIR} + ${OMNIORB_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${GRAPHVIZ_INCLUDE_DIR} + ${QT_INCLUDES} + ${QSCINTILLA_INCLUDE_DIRS} + ${SALOME_INCL_PATH} + ${PROJECT_BINARY_DIR}/src/genericgui + ${PROJECT_SOURCE_DIR}/src + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${PROJECT_SOURCE_DIR}/src/runtime + ${PROJECT_SOURCE_DIR}/src/yacsloader + ${PROJECT_SOURCE_DIR}/src/hmi + ${PROJECT_SOURCE_DIR}/src/salomewrap + ${PROJECT_SOURCE_DIR}/src/genericgui + ${PROJECT_BINARY_DIR}/idl + ${PROJECT_BINARY_DIR}/src/yacsorb + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${QT_DEFINITIONS} + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${GRAPHVIZ_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + ${QT_LIBRARIES} + ${QSCINTILLA_LIBRARIES} + YACSRuntimeSALOME + YACSloader + SalomeWrap + HMI + SalomeResourcesManager + ${EXPAT_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${GRAPHVIZ_LIBRARIES} + ) + +# --- resources --- + +# resource files / to be processed by uic +SET(_uic_files + FormComponent.ui + FormContainer.ui + FormEachLoop.ui + FormEditItem.ui + FormEditTree.ui + FormLoop.ui + FormSchemaView.ui + FormUndoRedo.ui + LogViewer.ui + TablePorts.ui + TableSwitch.ui + CaseSwitch.ui + FormOptimizerLoop.ui + ) + +# --- headers --- + +SET(GenericGui_HEADERS + ) + +# header files / to be processed by moc +SET(_moc_HEADERS + CaseSwitch.hxx + EditionBloc.hxx + EditionComponent.hxx + EditionContainer.hxx + EditionControlLink.hxx + EditionDataLink.hxx + EditionDataType.hxx + EditionElementaryNode.hxx + EditionForEachLoop.hxx + EditionOptimizerLoop.hxx + EditionInputPort.hxx + EditionLoop.hxx + EditionNode.hxx + EditionOutNode.hxx + EditionOutputPort.hxx + EditionPresetNode.hxx + EditionProc.hxx + EditionPyFunc.hxx + EditionSalomeNode.hxx + EditionScript.hxx + EditionStudyInNode.hxx + EditionStudyOutNode.hxx + EditionSwitch.hxx + EditionWhile.hxx + FormComponent.hxx + FormContainer.hxx + FormEachLoop.hxx + FormEditItem.hxx + FormEditTree.hxx + FormLoop.hxx + FormOptimizerLoop.hxx + FormSchemaView.hxx + FormUndoRedo.hxx + GenericGui.hxx + GraphicsView.hxx + ItemEdition.hxx + ListJobs_GUI.hxx + LogViewer.hxx + Menus.hxx + PropertyEditor.hxx + SchemaComponentItem.hxx + SchemaComposedNodeItem.hxx + SchemaContainerItem.hxx + SchemaDataTypeItem.hxx + SchemaDirContainersItem.hxx + SchemaDirLinksItem.hxx + SchemaDirTypesItem.hxx + SchemaInPortItem.hxx + SchemaItem.hxx + SchemaLinkItem.hxx + SchemaModel.hxx + SchemaNodeItem.hxx + SchemaOutPortItem.hxx + SchemaProcItem.hxx + SchemaReferenceItem.hxx + TablePortsEdition.hxx + TableSwitch.hxx + TreeView.hxx + YACSWidgets.hxx + ValueDelegate.hxx + ) + +# header files / uic wrappings +QT4_WRAP_UI(_uic_HEADERS ${_uic_files}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +SET(GenericGui_SOURCES + GenericGuiExport.hxx + CaseSwitch.hxx + CaseSwitch.cxx + CatalogWidget.hxx + CatalogWidget.cxx + EditionBloc.hxx + EditionBloc.cxx + EditionComponent.hxx + EditionComponent.cxx + EditionContainer.hxx + EditionContainer.cxx + EditionControlLink.hxx + EditionControlLink.cxx + EditionDataLink.hxx + EditionDataLink.cxx + EditionDataType.hxx + EditionDataType.cxx + EditionElementaryNode.hxx + EditionElementaryNode.cxx + EditionForEachLoop.hxx + EditionForEachLoop.cxx + EditionOptimizerLoop.hxx + EditionOptimizerLoop.cxx + EditionInputPort.hxx + EditionInputPort.cxx + EditionLoop.hxx + EditionLoop.cxx + EditionNode.hxx + EditionNode.cxx + EditionOutNode.hxx + EditionOutNode.cxx + EditionOutputPort.hxx + EditionOutputPort.cxx + EditionPresetNode.hxx + EditionPresetNode.cxx + EditionProc.hxx + EditionProc.cxx + EditionPyFunc.hxx + EditionPyFunc.cxx + EditionSalomeNode.hxx + EditionSalomeNode.cxx + EditionScript.hxx + EditionScript.cxx + EditionStudyInNode.hxx + EditionStudyInNode.cxx + EditionStudyOutNode.hxx + EditionStudyOutNode.cxx + EditionSwitch.hxx + EditionSwitch.cxx + EditionWhile.hxx + EditionWhile.cxx + FormComponent.hxx + FormComponent.cxx + FormContainer.hxx + FormContainer.cxx + FormEachLoop.hxx + FormEachLoop.cxx + FormEditItem.hxx + FormEditItem.cxx + FormEditTree.hxx + FormEditTree.cxx + FormLoop.hxx + FormLoop.cxx + FormOptimizerLoop.hxx + FormOptimizerLoop.cxx + FormSchemaView.hxx + FormSchemaView.cxx + FormUndoRedo.hxx + FormUndoRedo.cxx + GenericGui.hxx + GenericGui.cxx + GraphicsView.hxx + GraphicsView.cxx + GuiEditor.hxx + GuiEditor.cxx + GuiExecutor.hxx + GuiExecutor.cxx + GuiObserver_i.hxx + GuiObserver_i.cxx + ItemEdition.hxx + ItemEdition.cxx + ItemMimeData.hxx + ItemMimeData.cxx + LinkAStar.hxx + LinkAStar.cxx + LinkMatrix.hxx + LinkMatrix.cxx + ListJobs_GUI.hxx + ListJobs_GUI.cxx + LogViewer.hxx + LogViewer.cxx + Menus.hxx + Menus.cxx + Message.hxx + Message.cxx + PropertyEditor.hxx + PropertyEditor.cxx + QtGuiContext.hxx + QtGuiContext.cxx + Resource.hxx + Resource.cxx + SceneComposedNodeItem.hxx + SceneComposedNodeItem.cxx + SceneCtrlInPortItem.hxx + SceneCtrlInPortItem.cxx + SceneCtrlLinkItem.hxx + SceneCtrlLinkItem.cxx + SceneCtrlOutPortItem.hxx + SceneCtrlOutPortItem.cxx + SceneCtrlPortItem.hxx + SceneCtrlPortItem.cxx + Scene.cxx + Scene.hxx + SceneBlocItem.hxx + SceneBlocItem.cxx + SceneDataPortItem.hxx + SceneDataPortItem.cxx + SceneDSLinkItem.hxx + SceneDSLinkItem.cxx + SceneElementaryNodeItem.hxx + SceneElementaryNodeItem.cxx + SceneHeaderItem.hxx + SceneHeaderItem.cxx + SceneHeaderNodeItem.hxx + SceneHeaderNodeItem.cxx + SceneInPortItem.hxx + SceneInPortItem.cxx + SceneItem.hxx + SceneItem.cxx + SceneLinkItem.hxx + SceneLinkItem.cxx + SceneNodeItem.hxx + SceneNodeItem.cxx + SceneObserverItem.hxx + SceneObserverItem.cxx + SceneOutPortItem.hxx + SceneOutPortItem.cxx + ScenePortItem.hxx + ScenePortItem.cxx + SceneProcItem.hxx + SceneProcItem.cxx + SceneTextItem.hxx + SceneTextItem.cxx + SchemaComponentItem.hxx + SchemaComponentItem.cxx + SchemaComposedNodeItem.hxx + SchemaComposedNodeItem.cxx + SchemaContainerItem.hxx + SchemaContainerItem.cxx + SchemaDataTypeItem.hxx + SchemaDataTypeItem.cxx + SchemaDirContainersItem.hxx + SchemaDirContainersItem.cxx + SchemaDirLinksItem.hxx + SchemaDirLinksItem.cxx + SchemaDirTypesItem.hxx + SchemaDirTypesItem.cxx + SchemaInPortItem.hxx + SchemaInPortItem.cxx + SchemaItem.hxx + SchemaItem.cxx + SchemaLinkItem.hxx + SchemaLinkItem.cxx + SchemaModel.hxx + SchemaModel.cxx + SchemaNodeItem.hxx + SchemaNodeItem.cxx + SchemaOutPortItem.hxx + SchemaOutPortItem.cxx + SchemaProcItem.hxx + SchemaProcItem.cxx + SchemaReferenceItem.hxx + SchemaReferenceItem.cxx + TablePortsEdition.hxx + TablePortsEdition.cxx + TableSwitch.hxx + TableSwitch.cxx + TreeView.hxx + TreeView.cxx + ValueDelegate.hxx + ValueDelegate.cxx + VisitorSaveGuiSchema.hxx + VisitorSaveGuiSchema.cxx + YACSWidgets.hxx + YACSWidgets.cxx + YACSGuiLoader.hxx + YACSGuiLoader.cxx + ${_moc_SOURCES} + ${_uic_files} + ) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_res_files + resources/add_in_study.png + resources/add_node.png + resources/addRowCols.png + resources/arrange_nodes.png + resources/autoComputeLink.png + resources/block_node.png + resources/breakpoints_active.png + resources/breakpoints.png + resources/centerOnNode.png + resources/shrinkExpand.png + resources/change_informations.png + resources/component.png + resources/connect_to_batch_session.png + resources/container.png + resources/control_link.png + resources/control_view.png + resources/copy.png + resources/cut.png + resources/dataflow_view.png + resources/data_link.png + resources/datastream_view.png + resources/delete.png + resources/emphasisLink.png + resources/execute_in_batch.png + resources/export_dataflow.png + resources/filter_next_steps.png + resources/filter_notification.png + resources/folder_cyan.png + resources/folder_cyan_open.png + resources/force2nodeLink.png + resources/full_view.png + resources/hideLink.png + resources/icon_down.png + resources/icon_insert.png + resources/icon_minus.png + resources/icon_plus.png + resources/icon_select.png + resources/icon_text.png + resources/icon_up.png + resources/import_dataflow.png + resources/import_superv_dataflow.png + resources/in_port.png + resources/insert_file.png + resources/kill.png + resources/load_execution_state.png + resources/loop_node.png + resources/mode_continue.png + resources/modify_dataflow.png + resources/modify_superv_dataflow.png + resources/ModuleYacs.png + resources/new_batch_execution.png + resources/new_block_node.png + resources/new_corba_component.png + resources/new_corba_service_node.png + resources/new_cpp_node.png + resources/new_dataflow.png + resources/new_edition.png + resources/new_execution.png + resources/new_foreach_loop_node.png + resources/new_for_loop_node.png + resources/new_from_library_node.png + resources/new_inline_function_node.png + resources/new_inline_script_node.png + resources/new_link.png + resources/new_nodenode_service_node.png + resources/new_salome_component.png + resources/new_salomepy_component.png + resources/new_salome_service_node.png + resources/new_service_inline_node.png + resources/new_switch_loop_node.png + resources/new_while_loop_node.png + resources/new_xml_node.png + resources/node.png + resources/ob_service_node.png + resources/out_port.png + resources/paste.png + resources/pause.png + resources/rebuild_links.png + resources/redo.png + resources/reload.png + resources/remote_run.png + resources/reset.png + resources/resume.png + resources/run_active.png + resources/run_object.png + resources/run.png + resources/batch.png + resources/sample.png + resources/save_dataflow.png + resources/save_dataflow_state.png + resources/schema.png + resources/showLink.png + resources/simplifyLink.png + resources/step_by_step_active.png + resources/step_by_step.png + resources/straightLink.png + resources/stream_link.png + resources/suspend_resume.png + resources/switch_node.png + resources/table_view.png + resources/toggle_stop_on_error.png + resources/toggleVisibility.png + resources/undo.png + resources/whatsThis.png + resources/zoomToBloc.png +) +# --- rules --- + +ADD_LIBRARY(GenericGui ${GenericGui_SOURCES}) +TARGET_LINK_LIBRARIES(GenericGui ${_link_LIBRARIES}) +INSTALL(TARGETS GenericGui EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +INSTALL(FILES ${_res_files} DESTINATION ${SALOME_YACS_INSTALL_RES_DATA}) diff --git a/src/genericgui/Makefile.am b/src/genericgui/Makefile.am deleted file mode 100644 index b9876350b..000000000 --- a/src/genericgui/Makefile.am +++ /dev/null @@ -1,481 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -libdir = $(prefix)/lib/salome -bindir = $(prefix)/bin/salome - -lib_LTLIBRARIES = libGenericGui.la - -UIC_FILES = \ - ui_FormComponent.h \ - ui_FormContainer.h \ - ui_FormEachLoop.h \ - ui_FormEditItem.h \ - ui_FormEditTree.h \ - ui_FormLoop.h \ - ui_FormSchemaView.h \ - ui_FormUndoRedo.h \ - ui_LogViewer.h \ - ui_TablePorts.h \ - ui_TableSwitch.h \ - ui_CaseSwitch.h \ - ui_FormOptimizerLoop.h - -BUILT_SOURCES = \ - $(UIC_FILES) - -EXTRA_DIST = \ - FormComponent.ui \ - FormContainer.ui \ - FormEachLoop.ui \ - FormEditItem.ui \ - FormEditTree.ui \ - FormLoop.ui \ - FormSchemaView.ui \ - FormUndoRedo.ui \ - LogViewer.ui \ - TablePorts.ui \ - TableSwitch.ui \ - CaseSwitch.ui \ - FormOptimizerLoop.ui - -libGenericGui_la_SOURCES = \ - GenericGuiExport.hxx \ - CaseSwitch.hxx \ - CaseSwitch.cxx \ - CatalogWidget.hxx \ - CatalogWidget.cxx \ - EditionBloc.hxx \ - EditionBloc.cxx \ - EditionComponent.hxx \ - EditionComponent.cxx \ - EditionContainer.hxx \ - EditionContainer.cxx \ - EditionControlLink.hxx \ - EditionControlLink.cxx \ - EditionDataLink.hxx \ - EditionDataLink.cxx \ - EditionDataType.hxx \ - EditionDataType.cxx \ - EditionElementaryNode.hxx \ - EditionElementaryNode.cxx \ - EditionForEachLoop.hxx \ - EditionForEachLoop.cxx \ - EditionOptimizerLoop.hxx \ - EditionOptimizerLoop.cxx \ - EditionInputPort.hxx \ - EditionInputPort.cxx \ - EditionLoop.hxx \ - EditionLoop.cxx \ - EditionNode.hxx \ - EditionNode.cxx \ - EditionOutNode.hxx \ - EditionOutNode.cxx \ - EditionOutputPort.hxx \ - EditionOutputPort.cxx \ - EditionPresetNode.hxx \ - EditionPresetNode.cxx \ - EditionProc.hxx \ - EditionProc.cxx \ - EditionPyFunc.hxx \ - EditionPyFunc.cxx \ - EditionSalomeNode.hxx \ - EditionSalomeNode.cxx \ - EditionScript.hxx \ - EditionScript.cxx \ - EditionStudyInNode.hxx \ - EditionStudyInNode.cxx \ - EditionStudyOutNode.hxx \ - EditionStudyOutNode.cxx \ - EditionSwitch.hxx \ - EditionSwitch.cxx \ - EditionWhile.hxx \ - EditionWhile.cxx \ - FormComponent.hxx \ - FormComponent.cxx \ - FormContainer.hxx \ - FormContainer.cxx \ - FormEachLoop.hxx \ - FormEachLoop.cxx \ - FormEditItem.hxx \ - FormEditItem.cxx \ - FormEditTree.hxx \ - FormEditTree.cxx \ - FormLoop.hxx \ - FormLoop.cxx \ - FormOptimizerLoop.hxx \ - FormOptimizerLoop.cxx \ - FormSchemaView.hxx \ - FormSchemaView.cxx \ - FormUndoRedo.hxx \ - FormUndoRedo.cxx \ - GenericGui.hxx \ - GenericGui.cxx \ - GraphicsView.hxx \ - GraphicsView.cxx \ - GuiEditor.hxx \ - GuiEditor.cxx \ - GuiExecutor.hxx \ - GuiExecutor.cxx \ - GuiObserver_i.hxx \ - GuiObserver_i.cxx \ - ItemEdition.hxx \ - ItemEdition.cxx \ - ItemMimeData.hxx \ - ItemMimeData.cxx \ - LinkAStar.hxx \ - LinkAStar.cxx \ - LinkMatrix.hxx \ - LinkMatrix.cxx \ - ListJobs_GUI.hxx \ - ListJobs_GUI.cxx \ - LogViewer.hxx \ - LogViewer.cxx \ - Menus.hxx \ - Menus.cxx \ - Message.hxx \ - Message.cxx \ - PropertyEditor.hxx \ - PropertyEditor.cxx \ - QtGuiContext.hxx \ - QtGuiContext.cxx \ - Resource.hxx \ - Resource.cxx \ - SceneComposedNodeItem.hxx \ - SceneComposedNodeItem.cxx \ - SceneCtrlInPortItem.hxx \ - SceneCtrlInPortItem.cxx \ - SceneCtrlLinkItem.hxx \ - SceneCtrlLinkItem.cxx \ - SceneCtrlOutPortItem.hxx \ - SceneCtrlOutPortItem.cxx \ - SceneCtrlPortItem.hxx \ - SceneCtrlPortItem.cxx \ - Scene.cxx \ - Scene.hxx \ - SceneBlocItem.hxx \ - SceneBlocItem.cxx \ - SceneDataPortItem.hxx \ - SceneDataPortItem.cxx \ - SceneDSLinkItem.hxx \ - SceneDSLinkItem.cxx \ - SceneElementaryNodeItem.hxx \ - SceneElementaryNodeItem.cxx \ - SceneHeaderItem.hxx \ - SceneHeaderItem.cxx \ - SceneHeaderNodeItem.hxx \ - SceneHeaderNodeItem.cxx \ - SceneInPortItem.hxx \ - SceneInPortItem.cxx \ - SceneItem.hxx \ - SceneItem.cxx \ - SceneLinkItem.hxx \ - SceneLinkItem.cxx \ - SceneNodeItem.hxx \ - SceneNodeItem.cxx \ - SceneObserverItem.hxx \ - SceneObserverItem.cxx \ - SceneOutPortItem.hxx \ - SceneOutPortItem.cxx \ - ScenePortItem.hxx \ - ScenePortItem.cxx \ - SceneProcItem.hxx \ - SceneProcItem.cxx \ - SceneTextItem.hxx \ - SceneTextItem.cxx \ - SchemaComponentItem.hxx \ - SchemaComponentItem.cxx \ - SchemaComposedNodeItem.hxx \ - SchemaComposedNodeItem.cxx \ - SchemaContainerItem.hxx \ - SchemaContainerItem.cxx \ - SchemaDataTypeItem.hxx \ - SchemaDataTypeItem.cxx \ - SchemaDirContainersItem.hxx \ - SchemaDirContainersItem.cxx \ - SchemaDirLinksItem.hxx \ - SchemaDirLinksItem.cxx \ - SchemaDirTypesItem.hxx \ - SchemaDirTypesItem.cxx \ - SchemaInPortItem.hxx \ - SchemaInPortItem.cxx \ - SchemaItem.hxx \ - SchemaItem.cxx \ - SchemaLinkItem.hxx \ - SchemaLinkItem.cxx \ - SchemaModel.hxx \ - SchemaModel.cxx \ - SchemaNodeItem.hxx \ - SchemaNodeItem.cxx \ - SchemaOutPortItem.hxx \ - SchemaOutPortItem.cxx \ - SchemaProcItem.hxx \ - SchemaProcItem.cxx \ - SchemaReferenceItem.hxx \ - SchemaReferenceItem.cxx \ - TablePortsEdition.hxx \ - TablePortsEdition.cxx \ - TableSwitch.hxx \ - TableSwitch.cxx \ - TreeView.hxx \ - TreeView.cxx \ - ValueDelegate.hxx \ - ValueDelegate.cxx \ - VisitorSaveGuiSchema.hxx \ - VisitorSaveGuiSchema.cxx \ - YACSWidgets.hxx \ - YACSWidgets.cxx \ - YACSGuiLoader.hxx \ - YACSGuiLoader.cxx - -MOC_FILES = \ - CaseSwitch_moc.cxx \ - EditionBloc_moc.cxx \ - EditionComponent_moc.cxx \ - EditionContainer_moc.cxx \ - EditionControlLink_moc.cxx \ - EditionDataLink_moc.cxx \ - EditionDataType_moc.cxx \ - EditionElementaryNode_moc.cxx \ - EditionForEachLoop_moc.cxx \ - EditionOptimizerLoop_moc.cxx \ - EditionInputPort_moc.cxx \ - EditionLoop_moc.cxx \ - EditionNode_moc.cxx \ - EditionOutNode_moc.cxx \ - EditionOutputPort_moc.cxx \ - EditionPresetNode_moc.cxx \ - EditionProc_moc.cxx \ - EditionPyFunc_moc.cxx \ - EditionSalomeNode_moc.cxx \ - EditionScript_moc.cxx \ - EditionStudyInNode_moc.cxx \ - EditionStudyOutNode_moc.cxx \ - EditionSwitch_moc.cxx \ - EditionWhile_moc.cxx \ - FormComponent_moc.cxx \ - FormContainer_moc.cxx \ - FormEachLoop_moc.cxx \ - FormEditItem_moc.cxx \ - FormEditTree_moc.cxx \ - FormLoop_moc.cxx \ - FormOptimizerLoop_moc.cxx \ - FormSchemaView_moc.cxx \ - FormUndoRedo_moc.cxx \ - GenericGui_moc.cxx \ - GraphicsView_moc.cxx \ - ItemEdition_moc.cxx \ - ListJobs_GUI_moc.cxx \ - LogViewer_moc.cxx \ - Menus_moc.cxx \ - PropertyEditor_moc.cxx \ - SchemaComponentItem_moc.cxx \ - SchemaComposedNodeItem_moc.cxx \ - SchemaContainerItem_moc.cxx \ - SchemaDataTypeItem_moc.cxx \ - SchemaDirContainersItem_moc.cxx \ - SchemaDirLinksItem_moc.cxx \ - SchemaDirTypesItem_moc.cxx \ - SchemaInPortItem_moc.cxx \ - SchemaItem_moc.cxx \ - SchemaLinkItem_moc.cxx \ - SchemaModel_moc.cxx \ - SchemaNodeItem_moc.cxx \ - SchemaOutPortItem_moc.cxx \ - SchemaProcItem_moc.cxx \ - SchemaReferenceItem_moc.cxx \ - TablePortsEdition_moc.cxx \ - TableSwitch_moc.cxx \ - TreeView_moc.cxx \ - YACSWidgets_moc.cxx \ - ValueDelegate_moc.cxx - -nodist_libGenericGui_la_SOURCES = \ - $(MOC_FILES) - -libGenericGui_la_CXXFLAGS = \ - $(qt4_cppflags) \ - $(qsci4_cppflags) \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(EXPAT_INCLUDES) \ - $(GRAPHVIZ_CPPFLAGS) \ - $(OMNIORB_CXXFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(LIBXML_INCLUDES) \ - $(EXPAT_INCLUDES) \ - -I$(KERNEL_ROOT_DIR)/include/salome \ - -I. \ - -I$(srcdir) \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../runtime \ - -I$(srcdir)/../yacsloader \ - -I$(srcdir)/../hmi \ - -I$(srcdir)/../salomewrap \ - -I../../idl \ - -I../yacsorb - -libGenericGui_la_LDFLAGS = $(qt4_ldflags) $(qsci4_ldflags) $(GRAPHVIZ_LDFLAGS) - -libGenericGui_la_LIBADD = $(qt4_libs) $(qsci4_libs)\ - ../runtime/libYACSRuntimeSALOME.la \ - ../yacsloader/libYACSloader.la \ - ../salomewrap/libSalomeWrap.la \ - ../hmi/libHMI.la \ - $(KERNEL_LDFLAGS) -lSalomeResourcesManager \ - $(EXPAT_LIBS) $(LIBXML_LIBS) $(GRAPHVIZ_LIBADD) - - - -ICONS = \ - resources/add_in_study.png \ - resources/add_node.png \ - resources/addRowCols.png \ - resources/arrange_nodes.png \ - resources/autoComputeLink.png \ - resources/block_node.png \ - resources/breakpoints_active.png \ - resources/breakpoints.png \ - resources/centerOnNode.png \ - resources/shrinkExpand.png \ - resources/change_informations.png \ - resources/component.png \ - resources/connect_to_batch_session.png \ - resources/container.png \ - resources/control_link.png \ - resources/control_view.png \ - resources/copy.png \ - resources/cut.png \ - resources/dataflow_view.png \ - resources/data_link.png \ - resources/datastream_view.png \ - resources/delete.png \ - resources/emphasisLink.png \ - resources/execute_in_batch.png \ - resources/export_dataflow.png \ - resources/filter_next_steps.png \ - resources/filter_notification.png \ - resources/folder_cyan.png \ - resources/folder_cyan_open.png \ - resources/force2nodeLink.png \ - resources/full_view.png \ - resources/hideLink.png \ - resources/icon_down.png \ - resources/icon_insert.png \ - resources/icon_minus.png \ - resources/icon_plus.png \ - resources/icon_select.png \ - resources/icon_text.png \ - resources/icon_up.png \ - resources/import_dataflow.png \ - resources/import_superv_dataflow.png \ - resources/in_port.png \ - resources/insert_file.png \ - resources/kill.png \ - resources/load_execution_state.png \ - resources/loop_node.png \ - resources/mode_continue.png \ - resources/modify_dataflow.png \ - resources/modify_superv_dataflow.png \ - resources/ModuleYacs.png \ - resources/new_batch_execution.png \ - resources/new_block_node.png \ - resources/new_corba_component.png \ - resources/new_corba_service_node.png \ - resources/new_cpp_node.png \ - resources/new_dataflow.png \ - resources/new_edition.png \ - resources/new_execution.png \ - resources/new_foreach_loop_node.png \ - resources/new_for_loop_node.png \ - resources/new_from_library_node.png \ - resources/new_inline_function_node.png \ - resources/new_inline_script_node.png \ - resources/new_link.png \ - resources/new_nodenode_service_node.png \ - resources/new_salome_component.png \ - resources/new_salomepy_component.png \ - resources/new_salome_service_node.png \ - resources/new_service_inline_node.png \ - resources/new_switch_loop_node.png \ - resources/new_while_loop_node.png \ - resources/new_xml_node.png \ - resources/node.png \ - resources/ob_service_node.png \ - resources/out_port.png \ - resources/paste.png \ - resources/pause.png \ - resources/rebuild_links.png \ - resources/redo.png \ - resources/reload.png \ - resources/remote_run.png \ - resources/reset.png \ - resources/resume.png \ - resources/run_active.png \ - resources/run_object.png \ - resources/run.png \ - resources/batch.png \ - resources/sample.png \ - resources/save_dataflow.png \ - resources/save_dataflow_state.png \ - resources/schema.png \ - resources/showLink.png \ - resources/simplifyLink.png \ - resources/step_by_step_active.png \ - resources/step_by_step.png \ - resources/straightLink.png \ - resources/stream_link.png \ - resources/suspend_resume.png \ - resources/switch_node.png \ - resources/table_view.png \ - resources/toggle_stop_on_error.png \ - resources/toggleVisibility.png \ - resources/undo.png \ - resources/whatsThis.png \ - resources/zoomToBloc.png - -salomeresdir = $(prefix)/share/salome/resources/@MODULE_NAME@ -dist_salomeres_DATA = $(QMFILES) ${ICONS} - - -ui_%.h: %.ui - $(QT_UIC) $< -o $@ - -# -------------------------------------------- -# *.h --> *_moc.cxx -# -------------------------------------------- - -SUFFIXES = .hxx _moc.cxx .qrc _qrc.cxx - -.hxx_moc.cxx : - $(QT_MOC) -p . -o $@ $< - -.qrc_qrc.cxx : - $(QT_RCC) -name $(*F) $< -o $@ - -#.ui.h : -# $(QT_UIC) -o $@ $< - - -clean-local-qt : - rm -f *_moc.cxx *_qrc.cxx ui_*.h - - -clean-local: clean-local-qt diff --git a/src/hmi/CMakeLists.txt b/src/hmi/CMakeLists.txt new file mode 100644 index 000000000..e44e63b10 --- /dev/null +++ b/src/hmi/CMakeLists.txt @@ -0,0 +1,68 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} + ${SALOME_INCL_PATH} + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${PROJECT_SOURCE_DIR}/src/runtime + ${PROJECT_SOURCE_DIR}/src/yacsloader + ${PROJECT_BINARY_DIR}/idl + ${PROJECT_BINARY_DIR}/src/yacsorb + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + ${EXPAT_LIBRARIES} + ${LIBXML2_LIBRARIES} + YACSRuntimeSALOME + YACSloader + ) + +# --- sources --- + +SET(HMI_SOURCES + commands.cxx + commandsProc.cxx + guiObservers.cxx + guiContext.cxx + ) + +# --- rules --- + +ADD_LIBRARY(HMI ${HMI_SOURCES}) +TARGET_LINK_LIBRARIES(HMI ${_link_LIBRARIES}) +INSTALL(TARGETS HMI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/hmi/Makefile.am b/src/hmi/Makefile.am deleted file mode 100644 index a48791f77..000000000 --- a/src/hmi/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -lib_LTLIBRARIES = libHMI.la - -# Implementation files -LIBSOURCES = \ - commands.cxx \ - commandsProc.cxx \ - guiObservers.cxx \ - guiContext.cxx - -# Headers -LIBHEADERS = - - - -libHMI_la_SOURCES = $(LIBSOURCES) $(LIBHEADERS) -libHMI_la_LDFLAGS = - -libHMI_la_LIBADD = \ - ../runtime/libYACSRuntimeSALOME.la \ - ../yacsloader/libYACSloader.la \ - $(EXPAT_LIBS) $(LIBXML_LIBS) - -libHMI_la_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_CXXFLAGS) $(OMNIORB_INCLUDES) \ - $(LIBXML_INCLUDES) \ - -I$(KERNEL_ROOT_DIR)/include/salome \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../runtime \ - -I$(srcdir)/../yacsloader \ - -I../../idl \ - -I../yacsorb - -EXTRA_DIST = \ -HMIExport.hxx \ -commands.hxx commandsProc.hxx \ -guiContext.hxx guiObservers.hxx - - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/pyqt/Makefile.am b/src/pyqt/CMakeLists.txt similarity index 90% rename from src/pyqt/Makefile.am rename to src/pyqt/CMakeLists.txt index 9dfcb4e34..d9abdc131 100644 --- a/src/pyqt/Makefile.am +++ b/src/pyqt/CMakeLists.txt @@ -16,7 +16,3 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # - -include $(top_srcdir)/adm/unix/make_begin.am - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/runtime/CMakeLists.txt b/src/runtime/CMakeLists.txt new file mode 100644 index 000000000..788f5dc3d --- /dev/null +++ b/src/runtime/CMakeLists.txt @@ -0,0 +1,209 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(SALOME_BUILD_TESTS) +#TODO: ADD_SUBDIRECTORY( Test ) +ENDIF(SALOME_BUILD_TESTS) + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_LIBS + SalomeLifeCycleCORBA + SalomeIDLKernel + SalomeNS + SalomeContainer + SALOMEBasics + SalomeResourcesManager + OpUtil + SALOMELocalTrace + Registry + SalomeNotification + ResourcesManager + SalomeHDFPersist + SalomeGenericObj + ) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) + + IF(SALOME_YACS_USE_DSC) + SET(DSC_LIBS SalomeDSCContainer) + ENDIF(SALOME_YACS_USE_DSC) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIR} + ${OMNIORB_ROOT_DIR}/include/omniORB4/internal + ${SALOME_INCL_PATH} + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${PROJECT_SOURCE_DIR}/idl + ${PROJECT_SOURCE_DIR} + ${PROJECT_BINARY_DIR} + ${PROJECT_BINARY_DIR}/idl + ${LIBXML2_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + ${DSC_LIBS} + ${SALOME_LIBS} + ${OMNIORB_LIBRARIES} + ${PYTHON_LIBRARIES} + ${LIBXML2_LIBRARIES} + SalomeIDLYACS + YACSlibEngine + ) + +# --- headers --- + +SET(YACSRuntimeSALOME_HEADERS + YACSRuntimeSALOMEExport.hxx + CalStreamPort.hxx + CORBAComponent.hxx + CORBACORBAConv.hxx + CORBACppConv.hxx + CORBANeutralConv.hxx + CORBANode.hxx + CORBAPorts.hxx + CORBAPythonConv.hxx + CORBAXMLConv.hxx + CppComponent.hxx + CppContainer.hxx + CppCORBAConv.hxx + CppCppConv.hxx + CppNeutralConv.hxx + CppNode.hxx + CppPorts.hxx + CppPythonConv.hxx + CppXMLConv.hxx + NeutralCORBAConv.hxx + NeutralCppConv.hxx + NeutralPythonConv.hxx + NeutralXMLConv.hxx + OutNode.hxx + PresetNode.hxx + PresetPorts.hxx + PyStdout.hxx + PythonCORBAConv.hxx + PythonCppConv.hxx + PythonNeutralConv.hxx + PythonNode.hxx + PythonPorts.hxx + PythonXMLConv.hxx + RuntimeSALOME.hxx + SalomeComponent.hxx + SalomeContainer.hxx + SALOMEDispatcher.hxx + SalomeProc.hxx + SalomePythonComponent.hxx + SalomePythonNode.hxx + SessionCataLoader.hxx + StudyNodes.hxx + StudyPorts.hxx + TypeConversions.hxx + VisitorSaveSalomeSchema.hxx + XMLCORBAConv.hxx + XMLCppConv.hxx + XMLNeutralConv.hxx + XMLNode.hxx + XMLPorts.hxx + XMLPythonConv.hxx + PythonInitConv.hxx + NeutralInitConv.hxx + SalomeOptimizerLoop.hxx + DistributedPythonNode.hxx + PyOptimizerAlg.hxx + ) + +# --- sources --- + +SET(YACSRuntimeSALOME_SOURCES + TypeConversions.cxx + CORBACORBAConv.cxx + CORBAPythonConv.cxx + CORBAXMLConv.cxx + CORBANeutralConv.cxx + XMLCORBAConv.cxx + XMLPythonConv.cxx + XMLNeutralConv.cxx + CORBANode.cxx + CORBAPorts.cxx + CppNode.cxx + CppPorts.cxx + NeutralPythonConv.cxx + NeutralCORBAConv.cxx + NeutralXMLConv.cxx + NeutralInitConv.cxx + PythonCORBAConv.cxx + PythonNeutralConv.cxx + PythonXMLConv.cxx + PythonInitConv.cxx + PythonNode.cxx + SalomePythonNode.cxx + DistributedPythonNode.cxx + SalomePythonComponent.cxx + SalomeContainer.cxx + PythonPorts.cxx + XMLNode.cxx + XMLPorts.cxx + RuntimeSALOME.cxx + SALOMEDispatcher.cxx + SalomeProc.cxx + CalStreamPort.cxx + CORBAComponent.cxx + SalomeComponent.cxx + CppComponent.cxx + CppContainer.cxx + CppCORBAConv.cxx + CppNeutralConv.cxx + CppXMLConv.cxx + CppCppConv.cxx + CppPythonConv.cxx + CORBACppConv.cxx + NeutralCppConv.cxx + XMLCppConv.cxx + PythonCppConv.cxx + SessionCataLoader.cxx + PresetPorts.cxx + PresetNode.cxx + OutNode.cxx + StudyNodes.cxx + StudyPorts.cxx + VisitorSaveSalomeSchema.cxx + PyStdout.cxx + SalomeOptimizerLoop.cxx + PyOptimizerAlg.cxx + ) + +# --- rules --- + +ADD_LIBRARY(YACSRuntimeSALOME ${YACSRuntimeSALOME_SOURCES}) +TARGET_LINK_LIBRARIES(YACSRuntimeSALOME ${_link_LIBRARIES}) +INSTALL(TARGETS YACSRuntimeSALOME EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +INSTALL(FILES ${YACSRuntimeSALOME_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/runtime/Makefile.am b/src/runtime/Makefile.am deleted file mode 100644 index 729113578..000000000 --- a/src/runtime/Makefile.am +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -SUBDIRS = Test - - - -lib_LTLIBRARIES = libYACSRuntimeSALOME.la - -libYACSRuntimeSALOME_la_SOURCES = \ - TypeConversions.cxx \ - CORBACORBAConv.cxx \ - CORBAPythonConv.cxx \ - CORBAXMLConv.cxx \ - CORBANeutralConv.cxx \ - XMLCORBAConv.cxx \ - XMLPythonConv.cxx \ - XMLNeutralConv.cxx \ - CORBANode.cxx \ - CORBAPorts.cxx \ - CppNode.cxx \ - CppPorts.cxx \ - NeutralPythonConv.cxx \ - NeutralCORBAConv.cxx \ - NeutralXMLConv.cxx \ - NeutralInitConv.cxx \ - PythonCORBAConv.cxx \ - PythonNeutralConv.cxx \ - PythonXMLConv.cxx \ - PythonInitConv.cxx \ - PythonNode.cxx \ - SalomePythonNode.cxx \ - DistributedPythonNode.cxx \ - SalomePythonComponent.cxx \ - SalomeContainer.cxx \ - PythonPorts.cxx \ - XMLNode.cxx \ - XMLPorts.cxx \ - RuntimeSALOME.cxx \ - SALOMEDispatcher.cxx \ - SalomeProc.cxx \ - CalStreamPort.cxx \ - CORBAComponent.cxx \ - SalomeComponent.cxx \ - CppComponent.cxx \ - CppContainer.cxx \ - CppCORBAConv.cxx \ - CppNeutralConv.cxx \ - CppXMLConv.cxx \ - CppCppConv.cxx \ - CppPythonConv.cxx \ - CORBACppConv.cxx \ - NeutralCppConv.cxx \ - XMLCppConv.cxx \ - PythonCppConv.cxx \ - SessionCataLoader.cxx \ - PresetPorts.cxx \ - PresetNode.cxx \ - OutNode.cxx \ - StudyNodes.cxx \ - StudyPorts.cxx \ - VisitorSaveSalomeSchema.cxx \ - PyStdout.cxx \ - SalomeOptimizerLoop.cxx \ - PyOptimizerAlg.cxx \ - $(__dummy__) - -salomeinclude_HEADERS = \ -YACSRuntimeSALOMEExport.hxx \ -CalStreamPort.hxx CORBAComponent.hxx CORBACORBAConv.hxx CORBACppConv.hxx \ -CORBANeutralConv.hxx CORBANode.hxx CORBAPorts.hxx CORBAPythonConv.hxx \ -CORBAXMLConv.hxx CppComponent.hxx CppContainer.hxx CppCORBAConv.hxx \ -CppCppConv.hxx CppNeutralConv.hxx CppNode.hxx CppPorts.hxx \ -CppPythonConv.hxx CppXMLConv.hxx NeutralCORBAConv.hxx NeutralCppConv.hxx \ -NeutralPythonConv.hxx NeutralXMLConv.hxx OutNode.hxx PresetNode.hxx \ -PresetPorts.hxx PyStdout.hxx PythonCORBAConv.hxx PythonCppConv.hxx \ -PythonNeutralConv.hxx PythonNode.hxx PythonPorts.hxx PythonXMLConv.hxx \ -RuntimeSALOME.hxx SalomeComponent.hxx SalomeContainer.hxx \ -SALOMEDispatcher.hxx SalomeProc.hxx SalomePythonComponent.hxx SalomePythonNode.hxx \ -SessionCataLoader.hxx StudyNodes.hxx StudyPorts.hxx TypeConversions.hxx \ -VisitorSaveSalomeSchema.hxx XMLCORBAConv.hxx XMLCppConv.hxx XMLNeutralConv.hxx \ -XMLNode.hxx XMLPorts.hxx XMLPythonConv.hxx PythonInitConv.hxx \ -NeutralInitConv.hxx SalomeOptimizerLoop.hxx DistributedPythonNode.hxx PyOptimizerAlg.hxx - -EXTRA_libYACSRuntimeSALOME_la_SOURCES = \ - $(__dummy__) - -if SALOME_KERNEL -SALOME_LIBS=$(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA -lSalomeIDLKernel -lSalomeNS -lSalomeContainer -lSALOMEBasics -lSalomeResourcesManager -lOpUtil -lSALOMELocalTrace -lRegistry -lSalomeNotification -lResourcesManager -lSalomeHDFPersist -lSalomeGenericObj -SALOME_INCL_PATH=-I$(KERNEL_ROOT_DIR)/include/salome -endif - -if DSC_PORTS -DSC_LIBS=$(KERNEL_LDFLAGS) -lSalomeDSCContainer -endif - -libYACSRuntimeSALOME_la_LIBADD = \ - $(DSC_LIBS) $(SALOME_LIBS) $(OMNIORB_LIBS) $(PYTHON_LIBS) $(LIBXML_LIBS) \ - ../../idl/libSalomeIDLYACS.la \ - ../engine/libYACSlibEngine.la - -AM_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_INCLUDES) \ - -I$(OMNIORB_ROOT)/include/omniORB4/internal \ - $(OMNIORB_CXXFLAGS) \ - $(SALOME_INCL_PATH) \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I../../idl \ - -I../.. \ - $(LIBXML_INCLUDES) - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/runtime/RuntimeSALOME.cxx b/src/runtime/RuntimeSALOME.cxx index 94b34fb39..b20f46b96 100644 --- a/src/runtime/RuntimeSALOME.cxx +++ b/src/runtime/RuntimeSALOME.cxx @@ -404,7 +404,7 @@ void RuntimeSALOME::fini() std::string RuntimeSALOME::getVersion() const { -#if YACS_DEVELOPMENT +#ifdef YACS_DEVELOPMENT return CORBA::string_dup(YACS_VERSION_STR"dev"); #else return CORBA::string_dup(YACS_VERSION_STR); diff --git a/src/runtime_swig/CMakeLists.txt b/src/runtime_swig/CMakeLists.txt new file mode 100644 index 000000000..a0cc231d5 --- /dev/null +++ b/src/runtime_swig/CMakeLists.txt @@ -0,0 +1,105 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${SWIG_USE_FILE}) + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${SALOME_INCL_PATH} + ${PTHREAD_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIRS} + ${PROJECT_BINARY_DIR}/idl + ${PROJECT_BINARY_DIR}/src/engine_swig + ${PROJECT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${PROJECT_SOURCE_DIR}/src/engine_swig + ${PROJECT_SOURCE_DIR}/src/runtime +) + +# swig flags +SET_SOURCE_FILES_PROPERTIES(SALOMERuntime.i PROPERTIES + CPLUSPLUS ON + SWIG_DEFINITIONS "-shadow") +SET_PROPERTY(SOURCE SALOMERuntime.i PROPERTY + SWIG_FLAGS "-noexcept" "-DYACS_PTHREAD") + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + -DYACS_PTHREAD + ) + +# libraries to link to +SET(_link_LIBRARIES + YACSRuntimeSALOME + ${PYTHON_LIBRARIES} + ${OMNIORB_LIBRARIES} + ) + +# --- scripts --- +# scripts / swig wrappings +SET(_swig_SCRIPTS + ${CMAKE_CURRENT_BINARY_DIR}/SALOMERuntime.py +) + +ADD_CUSTOM_TARGET(docruntime.i + COMMAND DOXSRCDIR=${PROJECT_SOURCE_DIR}/src/runtime ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/Doxyfile + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/doxy2swig.py -n xml/index.xml docruntime.i + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + +# --- rules --- +SET(SWIGINCLUDES + ${PROJECT_SOURCE_DIR}/src/runtime/RuntimeSALOME.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/SALOMEDispatcher.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/SalomeProc.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/PythonNode.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/PythonPorts.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/CORBANode.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/CORBAPorts.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/TypeConversions.hxx + ${PROJECT_SOURCE_DIR}/src/runtime/SalomeOptimizerLoop.hxx + ) +SWIG_ADD_MODULE(SALOMERuntime python SALOMERuntime.i) +ADD_DEPENDENCIES(_SALOMERuntime + SALOMERuntime.i + ${PROJECT_SOURCE_DIR}/src/engine_swig/pilot.i + ${PROJECT_SOURCE_DIR}/src/engine_swig/engtypemaps.i + docruntime.i + ${SWIGINCLUDES}) + +SWIG_LINK_LIBRARIES(SALOMERuntime ${_link_LIBRARIES}) +IF(WINDOWS) + SET_TARGET_PROPERTIES(_SALOMERuntime PROPERTIES DEBUG_OUTPUT_NAME _SALOMERuntime_d) +ENDIF(WINDOWS) + +INSTALL(TARGETS ${SWIG_MODULE_SALOMERuntime_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON}) + +SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON}) diff --git a/src/runtime_swig/Makefile.am b/src/runtime_swig/Makefile.am deleted file mode 100644 index 28bb68e6e..000000000 --- a/src/runtime_swig/Makefile.am +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -salomepython_PYTHON = SALOMERuntime.py -salomepyexec_LTLIBRARIES = _SALOMERuntime.la - -BUILT_SOURCES = \ - SALOMERuntimeWRAP.cxx - -_SALOMERuntime_la_SOURCES = \ - $(BUILT_SOURCES) - -MYSWIG_FLAGS = -noexcept -DYACS_PTHREAD -I$(srcdir)/../bases -I$(srcdir)/../engine -I$(srcdir)/../runtime \ - -I$(srcdir)/../engine_swig -I../engine_swig - -if DOXYGEN_IS_OK -MYSWIG_FLAGS += -DDOXYGEN_IS_OK -endif - -RUNTIMEINCLUDES= RuntimeSALOME.hxx SALOMEDispatcher.hxx SalomeProc.hxx PythonNode.hxx PythonPorts.hxx \ - CORBANode.hxx CORBAPorts.hxx TypeConversions.hxx SalomeOptimizerLoop.hxx - -SWIGINCLUDES = $(RUNTIMEINCLUDES:%=$(top_srcdir)/src/runtime/%) - -SALOMERuntimeWRAP.cxx: SALOMERuntime.i $(SWIGINCLUDES) docruntime.i ../engine_swig/pilot.i ../engine_swig/engtypemaps.i - $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) $(MYSWIG_FLAGS) -o $@ $(srcdir)/SALOMERuntime.i - -SALOMERuntime.py : SALOMERuntimeWRAP.cxx - -_SALOMERuntime_la_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(OMNIORB_CXXFLAGS) \ - -I$(KERNEL_ROOT_DIR)/include/salome \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../runtime \ - -I../../idl \ - $(LIBXML_INCLUDES) - -_SALOMERuntime_la_LDFLAGS = -module - -_SALOMERuntime_la_LIBADD = ../runtime/libYACSRuntimeSALOME.la - -docruntime.i:$(SWIGINCLUDES) - DOXSRCDIR=$(top_srcdir)/src/runtime doxygen $(top_srcdir)/Misc/Doxyfile - $(PYTHON) $(top_srcdir)/Misc/doxy2swig.py -n xml/index.xml docruntime.i - -EXTRA_DIST = SALOMERuntime.i - -clean-local: - rm -f SALOMERuntime.py* SALOMERuntimeWRAP.cxx docruntime.i SALOMERuntimeWRAP.h - rm -rf xml - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/salomegui/CMakeLists.txt b/src/salomegui/CMakeLists.txt new file mode 100644 index 000000000..84dda609b --- /dev/null +++ b/src/salomegui/CMakeLists.txt @@ -0,0 +1,127 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(UseQt4Ext) +INCLUDE(${QT_USE_FILE}) + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${SALOME_INCL_PATH} + ${GUI_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${PROJECT_SOURCE_DIR}/src/runtime + ${PROJECT_SOURCE_DIR}/src/yacsloader + ${PROJECT_SOURCE_DIR}/src/hmi + ${PROJECT_SOURCE_DIR}/src/salomewrap + ${PROJECT_SOURCE_DIR}/src/genericgui + ${PROJECT_BINARY_DIR}/src/genericgui + ${PROJECT_BINARY_DIR}/idl + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ${BOOST_DEFINITIONS} + ${QT_DEFINITIONS} + ${QSCINTILLA_DEFINITIONS} + ${GRAPHVIZ_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + GenericGui + Event + QtCore + QtGui + ${QSCINTILLA_LIBRARIES} + SalomeApp + SalomeSession + ) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(YACS_RESOURCES + resources/YACS_icons.ts + resources/YACS_msg_en.ts + resources/YACS_msg_fr.ts +) + +SET(_res_files + resources/YACSSchemaCatalog.xml + resources/ModuleYacs.png + resources/ExecYACS.png + ) + +# --- headers --- + +SET(YACS_HEADERS + YACSExport.hxx + Yacsgui.hxx + ) + +# header files / to be processed by moc +SET(_moc_HEADERS + Yacsgui.hxx + ) + +# header files / uic wrappings +QT4_WRAP_UI(_uic_HEADERS ${_uic_files}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +SET(YACS_SOURCES + Yacsgui.cxx + Yacsgui_DataModel.hxx + Yacsgui_Resource.cxx + Yacsgui_Resource.hxx + Yacsgui_DataModel.cxx + ${_moc_SOURCES} + ) + +# --- rules --- + +ADD_LIBRARY(YACS ${YACS_SOURCES}) +TARGET_LINK_LIBRARIES(YACS ${_link_LIBRARIES}) +INSTALL(TARGETS YACS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +INSTALL(FILES ${YACS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${YACS_RESOURCES}" "${SALOME_YACS_INSTALL_RES_DATA}") + +INSTALL(FILES ${_res_files} DESTINATION ${SALOME_YACS_INSTALL_RES_DATA}) +SALOME_CONFIGURE_FILE(resources/YACSCatalog.xml.in + resources/YACSCatalog.xml + INSTALL ${SALOME_YACS_INSTALL_RES_DATA}) +SALOME_CONFIGURE_FILE(resources/SalomeApp.xml.in + resources/SalomeApp.xml + INSTALL ${SALOME_YACS_INSTALL_RES_DATA}) diff --git a/src/salomegui/Makefile.am b/src/salomegui/Makefile.am deleted file mode 100644 index 0e25d0f48..000000000 --- a/src/salomegui/Makefile.am +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -# header files -salomeinclude_HEADERS = \ - YACSExport.hxx \ - Yacsgui.hxx - -# Libraries targets -lib_LTLIBRARIES = libYACS.la - -dist_libYACS_la_SOURCES = \ - Yacsgui.cxx \ - Yacsgui_DataModel.hxx \ - Yacsgui_Resource.cxx \ - Yacsgui_Resource.hxx \ - Yacsgui_DataModel.cxx - -# MOC pre-processing -MOC_FILES = \ - Yacsgui_moc.cxx - -nodist_libYACS_la_SOURCES = $(MOC_FILES) - -libYACS_la_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_CXXFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(LIBXML_INCLUDES) \ - $(BOOST_CPPFLAGS) \ - -I$(KERNEL_ROOT_DIR)/include/salome \ - -I$(GUI_ROOT_DIR)/include/salome \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../runtime \ - -I$(srcdir)/../yacsloader \ - -I$(srcdir)/../hmi \ - -I$(srcdir)/../salomewrap \ - -I$(srcdir)/../genericgui \ - -I../genericgui \ - -I../../idl \ - $(qt4_cppflags) \ - $(qsci4_cppflags) \ - @GRAPHVIZ_CPPFLAGS@ - -libYACS_la_LDFLAGS = \ - @GRAPHVIZ_LDFLAGS@ \ - -L$(GUI_ROOT_DIR)/lib/salome -L$(KERNEL_ROOT_DIR)/lib/salome \ - $(qt4_ldflags) $(qsci4_ldflags) - -libYACS_la_LIBADD = \ - ../genericgui/libGenericGui.la \ - -lEvent \ - $(qt4_libs) $(qsci4_libs) \ - -lSalomeApp -lSalomeSession - -# resources files - -ICONS = \ - resources/YACSSchemaCatalog.xml \ - resources/YACSCatalog.xml \ - resources/ModuleYacs.png \ - resources/ExecYACS.png - -# resources files -nodist_salomeres_DATA = \ - YACS_msg_en.qm \ - YACS_msg_fr.qm \ - resources/SalomeApp.xml - -QMFILES = \ - resources/YACS_msg_en.ts \ - resources/YACS_msg_fr.ts - -dist_salomeres_DATA = $(QMFILES) ${ICONS} - -ui_%.h: %.ui - $(QT_UIC) $< -o $@ - -# -------------------------------------------- -# *.h --> *_moc.cxx -# -------------------------------------------- - -SUFFIXES = .hxx _moc.cxx .qrc _qrc.cxx - -.hxx_moc.cxx : - $(QT_MOC) -p . -o $@ $< - -.qrc_qrc.cxx : - $(QT_RCC) -name $(*F) $< -o $@ - -#.ui.h : -# $(QT_UIC) -o $@ $< - - -clean-local-qt : - rm -f *_moc.cxx *_qrc.cxx - - -clean-local: clean-local-qt - rm -f YACS_msg_en.qm YACS_msg_fr.qm diff --git a/src/salomegui/resources/SalomeApp.xml.in b/src/salomegui/resources/SalomeApp.xml.in index bd6c748b2..a82603ef9 100644 --- a/src/salomegui/resources/SalomeApp.xml.in +++ b/src/salomegui/resources/SalomeApp.xml.in @@ -23,7 +23,7 @@ - +
diff --git a/src/salomegui/resources/YACSCatalog.xml.in b/src/salomegui/resources/YACSCatalog.xml.in index 584522fd7..af34596f4 100644 --- a/src/salomegui/resources/YACSCatalog.xml.in +++ b/src/salomegui/resources/YACSCatalog.xml.in @@ -36,7 +36,7 @@ YACS TUI Data P. RASCLE - @VERSION@ + @SALOMEYACS_VERSION@ EDF - RD 1 ModuleYacs.png diff --git a/src/salomegui_swig/CMakeLists.txt b/src/salomegui_swig/CMakeLists.txt new file mode 100644 index 000000000..b4880e802 --- /dev/null +++ b/src/salomegui_swig/CMakeLists.txt @@ -0,0 +1,94 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${SWIG_USE_FILE}) + +# swig flags +SET_SOURCE_FILES_PROPERTIES(libYACS_Swig.i PROPERTIES + CPLUSPLUS ON + SWIG_DEFINITIONS "-shadow") +SET_PROPERTY(SOURCE libYACS_Swig.i PROPERTY + SWIG_FLAGS "-noexcept" "-DYACS_PTHREAD") + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${SALOME_INCL_PATH} + ${GUI_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR}/src/salomegui + ${PROJECT_SOURCE_DIR}/src/salomewrap + ${OMNIORB_INCLUDE_DIR} +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${QT_DEFINITIONS} + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ${BOOST_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + YACS + ${PYTHON_LIBRARIES} + ) + +# --- sources --- +SET(YACS_Swig_SOURCES + YACSGUI_Swig.cxx + ) + +# --- scripts --- +# scripts / swig wrappings +SET(_swig_SCRIPTS + ${CMAKE_CURRENT_BINARY_DIR}/libYACS_Swig.py +) + +ADD_CUSTOM_TARGET(doc.i + COMMAND DOXSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/Doxyfile + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/doxy2swig.py -n xml/index.xml doc.i + DEPENDS YACSGUI_Swig.hxx YACSGUI_Swig.cxx + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + +# --- rules --- +ADD_LIBRARY(YACS_Swig ${YACS_Swig_SOURCES}) +TARGET_LINK_LIBRARIES(YACS_Swig ${_link_LIBRARIES}) +INSTALL(TARGETS YACS_Swig EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +SWIG_ADD_MODULE(libYACS_Swig python libYACS_Swig.i YACSGUI_Swig.cxx) +ADD_DEPENDENCIES(_libYACS_Swig libYACS_Swig.i doc.i YACSGUI_Swig.hxx) + +SWIG_LINK_LIBRARIES(libYACS_Swig "${_link_LIBRARIES}") +IF(WINDOWS) + SET_TARGET_PROPERTIES(_libYACS_Swig PROPERTIES DEBUG_OUTPUT_NAME _libYACS_Swig_d) +ENDIF(WINDOWS) + +INSTALL(TARGETS ${SWIG_MODULE_libYACS_Swig_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON}) + +SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON}) diff --git a/src/salomegui_swig/Makefile.am b/src/salomegui_swig/Makefile.am deleted file mode 100644 index fe9ed7c9f..000000000 --- a/src/salomegui_swig/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - - -SWIGSRC=libYACS_Swig.i -MYSWIG_FLAGS = - -if DOXYGEN_IS_OK -MYSWIG_FLAGS += -DDOXYGEN_IS_OK -endif - -salomepython_PYTHON = libYACS_Swig.py -salomepyexec_LTLIBRARIES = _libYACS_Swig.la - -libYACS_Swig.py: libYACS_SwigWRAP.cxx -BUILT_SOURCES = libYACS_SwigWRAP.cxx -_libYACS_Swig_la_SOURCES = $(SWIGSRC) YACSGUI_Swig.cxx -nodist__libYACS_Swig_la_SOURCES = $(BUILT_SOURCES) - -_libYACS_Swig_la_CPPFLAGS = -I$(KERNEL_ROOT_DIR)/include/salome \ - -I$(GUI_ROOT_DIR)/include/salome \ - -I$(srcdir) \ - -I$(srcdir)/../salomegui \ - -I$(srcdir)/../salomewrap \ - $(qt4_cppflags) $(THREAD_DEF) $(PYTHON_CPPFLAGS) $(OMNIORB_CXXFLAGS) $(OMNIORB_INCLUDES) $(BOOST_CPPFLAGS) - - - -_libYACS_Swig_la_LDFLAGS = -module -_libYACS_Swig_la_LIBADD = ../salomegui/libYACS.la $(PYTHON_LIBS) - -libYACS_SwigWRAP.cxx : $(SWIGSRC) YACSGUI_Swig.hxx doc.i - $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) $(MYSWIG_FLAGS) -o $@ $< - -doc.i:YACSGUI_Swig.hxx YACSGUI_Swig.cxx - DOXSRCDIR=$(srcdir) doxygen $(top_srcdir)/Misc/Doxyfile - $(PYTHON) $(top_srcdir)/Misc/doxy2swig.py -n xml/index.xml doc.i - -EXTRA_DIST = YACSGUI_Swig.hxx - -CLEANFILES = libYACS_SwigWRAP.cxx libYACS_Swig.py doc.i - -clean-local: - rm -f libYACS_Swig.py* - rm -rf xml - -include $(top_srcdir)/adm/unix/make_end.am - diff --git a/Makefile.am b/src/salomeloader/CMakeLists.txt similarity index 58% rename from Makefile.am rename to src/salomeloader/CMakeLists.txt index adce8e92c..963571a4d 100644 --- a/Makefile.am +++ b/src/salomeloader/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,31 +17,24 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -include $(top_srcdir)/adm/unix/make_begin.am +IF(WIN32) + SET(salomeloader_SCRIPTS salomeloader.bat) +ELSE() + SET(salomeloader_SCRIPTS salomeloader.sh) +ENDIF() -ACLOCAL_AMFLAGS = -I adm/unix/config_files +SET(salomeloader_PYTHON + salomeloader.py + ElementTree.py + ElementPath.py + graph.py + ) -if SALOME_KERNEL - SUBDIRS = idl src doc Demo -else - SUBDIRS = src doc Demo -endif +# --- rules --- -check-local: - cat /tmp/${USER}/UnitTestsResult +INSTALL(FILES ${salomeloader_SCRIPTS} DESTINATION ${SALOME_INSTALL_BINS}) -dist-hook: - rm -rf `find $(distdir) -name CVS` +INSTALL(FILES ${salomeloader_PYTHON} DESTINATION ${SALOME_INSTALL_PYTHON}) -dev_docs: - (cd doc && $(MAKE) $(AM_MAKEFLAGS) dev_docs) - -EXTRA_DIST = Misc \ - build_cmake \ - build_cmake.bat \ - build_configure \ - clean_configure \ - configure.in.base \ - rfind - -salomeinclude_HEADERS = YACS_version.h +FILE(GLOB samples ${PROJECT_SOURCE_DIR}/src/salomeloader/samples/*.xml) +INSTALL(FILES ${samples} DESTINATION ${SALOME_YACS_INSTALL_SUPERV_SAMPLES}) diff --git a/src/salomeloader/Makefile.am b/src/salomeloader/Makefile.am deleted file mode 100644 index 1c3acb8c4..000000000 --- a/src/salomeloader/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -dist_salomescript_SCRIPTS = salomeloader.sh salomeloader.bat -salomepython_PYTHON = salomeloader.py ElementTree.py ElementPath.py graph.py - -check-local:testSalomeLoader.py - LD_LIBRARY_PATH=$(KERNEL_ROOT_DIR)/lib/salome:${LD_LIBRARY_PATH} python testSalomeLoader.py - -EXTRA_DIST = samples - -dist-hook: - rm -rf `find $(distdir) -name CVS` - -install-data-local: - $(INSTALL) -d $(DESTDIR)$(prefix)/share/salome/yacssupervsamples - cp -rf $(srcdir)/samples/*.xml $(DESTDIR)$(prefix)/share/salome/yacssupervsamples - -uninstall-local: - rm -rf $(DESTDIR)$(prefix)/share/salome/yacssupervsamples - -distclean-local: - rm -rf tata.xml - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/salomewrap/CMakeLists.txt b/src/salomewrap/CMakeLists.txt new file mode 100644 index 000000000..5c6d214e5 --- /dev/null +++ b/src/salomewrap/CMakeLists.txt @@ -0,0 +1,90 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${QT_USE_FILE}) + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIR} + ${QT_INCLUDE_DIR} + ${SALOME_INCL_PATH} + ${GUI_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/src/bases + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ${BOOST_DEFINITIONS} + ${QT_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + QtCore + QtGui + ${OMNIORB_LIBRARIES} + YACSlibEngine + SalomeIDLKernel + CAM + suit + LightApp + qtx + QxScene + ObjBrowser + SalomeApp + ) + +# header files / to be processed by moc +SET(_moc_HEADERS + SalomeWrap_Module.hxx + WrapGraphicsView.hxx + ) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +SET(SalomeWrap_SOURCES + SalomeWrapExport.hxx + SalomeWrap_Module.hxx + SalomeWrap_Module.cxx + SalomeWrap_DataModel.hxx + SalomeWrap_DataModel.cxx + SuitWrapper.hxx + SuitWrapper.cxx + WrapGraphicsView.hxx + WrapGraphicsView.cxx + ${_moc_SOURCES} + ) + +# --- rules --- + +ADD_LIBRARY(SalomeWrap ${SalomeWrap_SOURCES}) +TARGET_LINK_LIBRARIES(SalomeWrap ${_link_LIBRARIES}) +INSTALL(TARGETS SalomeWrap EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/salomewrap/Makefile.am b/src/salomewrap/Makefile.am deleted file mode 100644 index b82267897..000000000 --- a/src/salomewrap/Makefile.am +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -# Libraries targets -lib_LTLIBRARIES = libSalomeWrap.la - -dist_libSalomeWrap_la_SOURCES = \ - SalomeWrapExport.hxx \ - SalomeWrap_Module.hxx \ - SalomeWrap_Module.cxx \ - SalomeWrap_DataModel.hxx \ - SalomeWrap_DataModel.cxx \ - SuitWrapper.hxx \ - SuitWrapper.cxx \ - WrapGraphicsView.hxx \ - WrapGraphicsView.cxx - -# MOC pre-processing -MOC_FILES = \ - SalomeWrap_Module_moc.cxx \ - WrapGraphicsView_moc.cxx - -nodist_libSalomeWrap_la_SOURCES = $(MOC_FILES) - -libSalomeWrap_la_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_CXXFLAGS) $(OMNIORB_INCLUDES) \ - $(BOOST_CPPFLAGS) \ - -I$(KERNEL_ROOT_DIR)/include/salome \ - -I$(GUI_ROOT_DIR)/include/salome \ - -I$(srcdir)/../bases \ - $(qt4_cppflags) - -libSalomeWrap_la_LDFLAGS = \ - $(KERNEL_LDFLAGS) \ - -L$(GUI_ROOT_DIR)/lib/salome \ - $(qt4_ldflags) - -libSalomeWrap_la_LIBADD = \ - $(qt4_libs) $(QT_LIBS) $(OMNIORB_LIBS) \ - ../engine/libYACSlibEngine.la \ - -lSalomeIDLKernel \ - -lCAM -lsuit -lLightApp -lqtx -lQxScene -lObjBrowser -lSalomeApp - -# resources files - - -# -------------------------------------------- -# *.h --> *_moc.cxx -# -------------------------------------------- - -SUFFIXES = .hxx _moc.cxx .qrc _qrc.cxx - -.hxx_moc.cxx : - $(QT_MOC) -p . -o $@ $< - - -clean-local-qt : - rm -f *_moc.cxx *_qrc.cxx - - -clean-local: clean-local-qt diff --git a/adm/unix/make_gui_begin.am b/src/wrappergen/CMakeLists.txt old mode 100755 new mode 100644 similarity index 91% rename from adm/unix/make_gui_begin.am rename to src/wrappergen/CMakeLists.txt index 9d88a52a3..de04204a1 --- a/adm/unix/make_gui_begin.am +++ b/src/wrappergen/CMakeLists.txt @@ -16,6 +16,6 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -dist_salomeres_DATA = $(QMFILES) ${ICONS} -ICONS = $(LIBICONS:%=resources/%) + +ADD_SUBDIRECTORY( src ) diff --git a/src/wrappergen/src/CMakeLists.txt b/src/wrappergen/src/CMakeLists.txt new file mode 100644 index 000000000..bb93f81ed --- /dev/null +++ b/src/wrappergen/src/CMakeLists.txt @@ -0,0 +1,63 @@ +# Copyright (C) 2006-2013 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(HXX2SALOMESCRIPTS + hxx2salome + hxx2salome_check + hxx2salome_cpp + hxx2salome_corba + parse01.awk + parse0.awk + parse1.awk + parse2.awk + parse30.awk + parse3.awk + parse4.awk + parse5.awk + renameSalomeModule + runIDLparser + compile_HXX2SALOME_GENERIC_CLASS_NAME.sh + ) + +SET(ENV_SH ${CMAKE_CURRENT_BINARY_DIR}/env_HXX2SALOME.sh) +SET(ENV_CSH ${CMAKE_CURRENT_BINARY_DIR}/env_HXX2SALOME.csh) + +INSTALL(FILES ${HXX2SALOMESCRIPTS} + DESTINATION ${SALOME_INSTALL_HXX2SALOME} + ) + +INSTALL(DIRECTORY HXX2SALOME_GENERIC_CLASS_NAME_SRC + DESTINATION ${SALOME_INSTALL_HXX2SALOME} + USE_SOURCE_PERMISSIONS + PATTERN "CVS" EXCLUDE + ) + +FILE(WRITE ${ENV_SH} + "#------ HXX2SALOME ------\n" + "export HXX2SALOME_ROOT_DIR=${CMAKE_INSTALL_PREFIX}/bin/HXX2SALOME_Test\n" + "export PATH=\${HXX2SALOME_ROOT_DIR}:\${PATH}\n" + "##\n" + ) +FILE(WRITE ${ENV_CSH} + "#------ HXX2SALOME ------\n" + "setenv HXX2SALOME_ROOT_DIR ${CMAKE_INSTALL_PREFIX}/bin/HXX2SALOME_Test\n" + "setenv PATH \${HXX2SALOME_ROOT_DIR}:\${PATH}\n" + "##\n" + ) +INSTALL(FILES ${ENV_SH} ${ENV_CSH} DESTINATION ${SALOME_INSTALL_HXX2SALOME}) diff --git a/src/wrappergen/src/Makefile.am b/src/wrappergen/src/Makefile.am deleted file mode 100644 index 1d0f2a305..000000000 --- a/src/wrappergen/src/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -bindir=${prefix}/bin/HXX2SALOME_Test - -ENV_SH=$(DESTDIR)${bindir}/env_HXX2SALOME.sh -ENV_CSH=$(DESTDIR)${bindir}/env_HXX2SALOME.csh - -HXX2SALOMESCRIPTS = hxx2salome hxx2salome_check hxx2salome_cpp hxx2salome_corba \ - parse01.awk \ - parse0.awk \ - parse1.awk \ - parse2.awk \ - parse30.awk \ - parse3.awk \ - parse4.awk \ - parse5.awk \ - renameSalomeModule \ - runIDLparser \ - compile_HXX2SALOME_GENERIC_CLASS_NAME.sh - -bin_SCRIPTS= $(HXX2SALOMESCRIPTS) - -EXTRA_DIST = $(HXX2SALOMESCRIPTS) HXX2SALOME_GENERIC_CLASS_NAME_SRC - -install-exec-hook: install_sh install_csh - \cp -rf ${srcdir}/HXX2SALOME_GENERIC_CLASS_NAME_SRC $(DESTDIR)${bindir} - -install_sh: - echo "#------ HXX2SALOME ------" > ${ENV_SH} - echo "export HXX2SALOME_ROOT_DIR=$(DESTDIR)${bindir}" >> ${ENV_SH} - echo "export PATH=\$${HXX2SALOME_ROOT_DIR}:\$${PATH}" >> ${ENV_SH} - echo "##" >> ${ENV_SH} - -install_csh: - echo "#------ HXX2SALOME ------" > ${ENV_CSH} - echo "setenv HXX2SALOME_ROOT_DIR $(DESTDIR)${bindir}" >> ${ENV_CSH} - echo "setenv PATH \$${HXX2SALOME_ROOT_DIR}:\$${PATH}" >> ${ENV_CSH} - echo "##" >> ${ENV_CSH} - -uninstall-local: - if test -d $(DESTDIR)$(bindir)/HXX2SALOME_GENERIC_CLASS_NAME_SRC; then \ - chmod -R +w $(DESTDIR)$(bindir)/HXX2SALOME_GENERIC_CLASS_NAME_SRC ; fi - rm -rf $(DESTDIR)$(bindir)/HXX2SALOME_GENERIC_CLASS_NAME_SRC - rm -rf $(ENV_CSH) ${ENV_SH} diff --git a/src/yacsloader/CMakeLists.txt b/src/yacsloader/CMakeLists.txt new file mode 100644 index 000000000..cfd7ffbe2 --- /dev/null +++ b/src/yacsloader/CMakeLists.txt @@ -0,0 +1,174 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(SALOME_BUILD_TESTS) +#TODO: ADD_SUBDIRECTORY( Test ) +ENDIF(SALOME_BUILD_TESTS) + +# --- options --- + +IF(SALOME_YACS_USE_KERNEL) + SET(SALOME_LIBS + ${KERNEL_DEFINITIONS} + SalomeLifeCycleCORBA + SalomeIDLKernel + SalomeNS + SalomeContainer + SALOMEBasics + SalomeResourcesManager + OpUtil + SALOMELocalTrace + Registry + SalomeNotification + ResourcesManager + SalomeHDFPersist + SalomeGenericObj + ) + SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS}) + + IF(SALOME_YACS_USE_DSC) + LIST(APPEND SALOME_LIBS SalomeDSCContainer) + ENDIF(SALOME_YACS_USE_DSC) +ENDIF(SALOME_YACS_USE_KERNEL) + +# additional include directories +INCLUDE_DIRECTORIES( + ${SALOME_INCL_PATH} + ${OMNIORB_INCLUDE_DIR} + ${EXPAT_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${PROJECT_SOURCE_DIR}/src/runtime + ${PROJECT_SOURCE_DIR}/src/yacsloader + ${PROJECT_SOURCE_DIR} + ) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ) +SET(_exec_DEFINITIONS + -g + ) + +# libraries to link to +SET(YACSloader_LIBRARIES + ${OMNIORB_LIBRARIES} + ${EXPAT_LIBRARIES} + YACSlibEngine + ) +SET(_link_LIBRARIES + YACSloader + YACSRuntimeSALOME + YACSlibEngine + ${SALOME_LIBS} + ${OMNIORB_LIBRARIES} + ${PYTHON_LIBRARIES} + ${LIBXML2_LIBRARIES} + ) + +# --- headers --- + +SET(YACSloader_HEADERS + YACSloaderExport.hxx + blocParsers.hxx + codeParsers.hxx + containerParsers.hxx + dataParsers.hxx + factory.hxx + linkParsers.hxx + LoadState.hxx + loopParsers.hxx + nodeParsers.hxx + outputParsers.hxx + parsers.hxx + parserBase.hxx + portParsers.hxx + presetParsers.hxx + ProcCataLoader.hxx + procParsers.hxx + propertyParsers.hxx + rootParser.hxx + switchParsers.hxx + inlineParsers.hxx + componentinstanceParsers.hxx + remoteParsers.hxx + serverParsers.hxx + serviceParsers.hxx + typeParsers.hxx + xmlParserBase.hxx + xmlrpcParsers.hxx + sinlineParsers.hxx + ) + +# --- sources --- + +SET(YACSloader_SOURCES + parsers.cxx + parserBase.cxx + dataParsers.cxx + typeParsers.cxx + propertyParsers.cxx + containerParsers.cxx + xmlrpcParsers.cxx + rootParser.cxx + codeParsers.cxx + LoadState.cxx + xmlParserBase.cxx + ProcCataLoader.cxx + componentinstanceParsers.cxx + ) +SET(driver_SOURCES + driver.cxx + ) +SET(resume_SOURCES + resume.cxx + ) +SET(debugger_SOURCES + debugger.cxx + ) + +# --- rules --- + +ADD_LIBRARY(YACSloader ${YACSloader_SOURCES}) +TARGET_LINK_LIBRARIES(YACSloader ${YACSloader_LIBRARIES}) +INSTALL(TARGETS YACSloader EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +ADD_EXECUTABLE(driver ${driver_SOURCES}) +TARGET_LINK_LIBRARIES(driver ${_link_LIBRARIES}) + +ADD_EXECUTABLE(resume ${resume_SOURCES}) +TARGET_LINK_LIBRARIES(resume ${_link_LIBRARIES}) + +ADD_EXECUTABLE(debugger ${debugger_SOURCES}) +TARGET_LINK_LIBRARIES(debugger ${_link_LIBRARIES}) + +SET_TARGET_PROPERTIES(driver resume debugger PROPERTIES COMPILE_FLAGS ${_exec_DEFINITIONS}) + +INSTALL(TARGETS driver resume debugger EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) + +INSTALL(FILES ${YACSloader_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) + +FILE(GLOB sample_files + ${PROJECT_SOURCE_DIR}/src/yacsloader/samples/*.xml + ${PROJECT_SOURCE_DIR}/src/yacsloader/samples/*.data) +INSTALL(FILES ${sample_files} DESTINATION ${SALOME_YACS_INSTALL_SAMPLES}) diff --git a/src/yacsloader/Makefile.am b/src/yacsloader/Makefile.am deleted file mode 100644 index a97e7fd79..000000000 --- a/src/yacsloader/Makefile.am +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -if CPPUNIT_IS_OK -SUBDIRS = Test -endif - -bin_PROGRAMS=driver debugger resume - -lib_LTLIBRARIES = libYACSloader.la - -libYACSloader_la_SOURCES = \ - parsers.cxx parserBase.cxx dataParsers.cxx typeParsers.cxx \ - propertyParsers.cxx containerParsers.cxx xmlrpcParsers.cxx \ - rootParser.cxx codeParsers.cxx \ - LoadState.cxx xmlParserBase.cxx ProcCataLoader.cxx \ - componentinstanceParsers.cxx \ - $(__dummy__) - -salomeinclude_HEADERS = \ -YACSloaderExport.hxx \ -blocParsers.hxx codeParsers.hxx containerParsers.hxx dataParsers.hxx factory.hxx \ -linkParsers.hxx LoadState.hxx loopParsers.hxx nodeParsers.hxx outputParsers.hxx \ -parserBase.hxx parsers.hxx portParsers.hxx presetParsers.hxx ProcCataLoader.hxx \ -procParsers.hxx propertyParsers.hxx rootParser.hxx switchParsers.hxx inlineParsers.hxx \ -componentinstanceParsers.hxx remoteParsers.hxx serverParsers.hxx serviceParsers.hxx \ -typeParsers.hxx xmlParserBase.hxx xmlrpcParsers.hxx sinlineParsers.hxx - -EXTRA_libYACSloader_la_SOURCES = \ - $(__dummy__) - -libYACSloader_la_LIBADD = ../engine/libYACSlibEngine.la -libYACSloader_la_LDFLAGS = $(OMNIORB_LIBS) $(EXPAT_LIBS) - -AM_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(OMNIORB_CXXFLAGS) \ - $(EXPAT_INCLUDES) \ - -I$(srcdir) \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine - -if SALOME_KERNEL -SALOME_LIBS=$(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA -lSalomeIDLKernel -lSalomeNS -lOpUtil \ - -lSalomeDSCContainer -lSalomeContainer -lSALOMEBasics -lSalomeResourcesManager \ - -lSALOMELocalTrace -lRegistry -lSalomeNotification -lResourcesManager \ - -lSalomeHDFPersist -lSalomeGenericObj -SALOME_INCL_PATH=-I$(KERNEL_ROOT_DIR)/include/salome -endif - - -driver_SOURCES = driver.cxx - -driver_CXXFLAGS = -g -DYACS_PTHREAD \ - $(PYTHON_CPPFLAGS) \ - $(SALOME_INCL_PATH) \ - $(OMNIORB_INCLUDES) \ - $(OMNIORB_CXXFLAGS) \ - $(EXPAT_INCLUDES) \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../runtime - -driver_LDADD = libYACSloader.la \ - ../runtime/libYACSRuntimeSALOME.la \ - ../engine/libYACSlibEngine.la \ - $(SALOME_LIBS) \ - $(OMNIORB_LIBS) \ - $(PYTHON_LDFLAGS) \ - $(PYTHON_EXTRA_LIBS) - -driver_LDFLAGS = $(PYTHON_EXTRA_LDFLAGS) -pthread $(LIBXML_LIBS) $(EXPAT_LIBS) - - -resume_SOURCES = resume.cxx - -resume_CXXFLAGS = -g -DYACS_PTHREAD \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(OMNIORB_CXXFLAGS) \ - $(EXPAT_INCLUDES) \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../runtime - -resume_LDADD = libYACSloader.la \ - ../runtime/libYACSRuntimeSALOME.la \ - ../engine/libYACSlibEngine.la \ - $(SALOME_LIBS) \ - $(OMNIORB_LIBS) \ - $(PYTHON_LDFLAGS) \ - $(PYTHON_EXTRA_LIBS) - -resume_LDFLAGS = $(PYTHON_EXTRA_LDFLAGS) -pthread $(LIBXML_LIBS) $(EXPAT_LIBS) - - -debugger_SOURCES = debugger.cxx - -debugger_CXXFLAGS = -g -DYACS_PTHREAD \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(OMNIORB_CXXFLAGS) \ - $(EXPAT_INCLUDES) \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../runtime - -debugger_LDADD = libYACSloader.la \ - ../runtime/libYACSRuntimeSALOME.la \ - ../engine/libYACSlibEngine.la \ - $(SALOME_LIBS) \ - $(OMNIORB_LIBS) \ - $(PYTHON_LDFLAGS) \ - $(PYTHON_EXTRA_LIBS) - -debugger_LDFLAGS = $(PYTHON_EXTRA_LDFLAGS) -pthread $(LIBXML_LIBS) $(EXPAT_LIBS) - -EXTRA_DIST = samples schema.xsd - -dist-hook: - rm -rf `find $(distdir) -name CVS` - -install-data-local: - $(INSTALL) -d $(DESTDIR)$(prefix)/share/salome/yacssamples - cp -rf $(srcdir)/samples/*.xml $(DESTDIR)$(prefix)/share/salome/yacssamples - cp -rf $(srcdir)/samples/*.data $(DESTDIR)$(prefix)/share/salome/yacssamples - -uninstall-local: - rm -rf $(DESTDIR)$(prefix)/share/salome/yacssamples - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/yacsloader_swig/CMakeLists.txt b/src/yacsloader_swig/CMakeLists.txt new file mode 100644 index 000000000..d35c2856b --- /dev/null +++ b/src/yacsloader_swig/CMakeLists.txt @@ -0,0 +1,96 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${SWIG_USE_FILE}) + +IF(SALOME_BUILD_TESTS) +#TODO: ADD_SUBDIRECTORY( Test ) +ENDIF(SALOME_BUILD_TESTS) + +# --- options --- + +# additional include directories +INCLUDE_DIRECTORIES( + ${PROJECT_SOURCE_DIR}/src/bases + ${PROJECT_SOURCE_DIR}/src/engine + ${PROJECT_SOURCE_DIR}/src/engine_swig + ${PROJECT_SOURCE_DIR}/src/yacsloader + ${PROJECT_BINARY_DIR}/src/engine_swig + ${OMNIORB_INCLUDE_DIR} + ${EXPAT_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIRS} +) + +# swig flags +SET_SOURCE_FILES_PROPERTIES(loader.i PROPERTIES + CPLUSPLUS ON + SWIG_DEFINITIONS "-shadow") +SET_PROPERTY(SOURCE loader.i PROPERTY + SWIG_FLAGS "-noexcept" "-DYACS_PTHREAD") + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + -DYACS_PTHREAD + ${PYTHON_DEFINITIONS} + ${OMNIORB_DEFINITIONS} + ) + +# libraries to link to +SET(_link_LIBRARIES + YACSloader + ${PYTHON_LIBRARIES} + ${OMNIORB_LIBRARIES} + ) + +# --- scripts --- +# scripts / swig wrappings +SET(_swig_SCRIPTS + ${CMAKE_CURRENT_BINARY_DIR}/loader.py +) + +ADD_CUSTOM_TARGET(docyacsloader.i + COMMAND DOXSRCDIR=${PROJECT_SOURCE_DIR}/src/yacsloader ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/Doxyfile + COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/doxy2swig.py -n xml/index.xml docyacsloader.i + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + +# --- rules --- +SET(SWIGINCLUDES + ${PROJECT_SOURCE_DIR}/src/yacsloader/parsers.hxx + ${PROJECT_SOURCE_DIR}/src/yacsloader/LoadState.hxx + ${PROJECT_SOURCE_DIR}/src/yacsloader/xmlParserBase.hxx + ${PROJECT_SOURCE_DIR}/src/yacsloader/ProcCataLoader.hxx + ) +SWIG_ADD_MODULE(loader python loader.i) +ADD_DEPENDENCIES(_loader + loader.i + ${PROJECT_SOURCE_DIR}/src/engine_swig/pilot.i + ${PROJECT_SOURCE_DIR}/src/engine_swig/engtypemaps.i + docyacsloader.i + ${SWIGINCLUDES}) + +SWIG_LINK_LIBRARIES(loader ${_link_LIBRARIES}) +IF(WINDOWS) + SET_TARGET_PROPERTIES(_loader PROPERTIES DEBUG_OUTPUT_NAME _loader_d) +ENDIF(WINDOWS) + +INSTALL(TARGETS ${SWIG_MODULE_loader_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON}) + +SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON}) diff --git a/src/yacsloader_swig/Makefile.am b/src/yacsloader_swig/Makefile.am deleted file mode 100644 index 682a1798a..000000000 --- a/src/yacsloader_swig/Makefile.am +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (C) 2006-2013 CEA/DEN, EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -include $(top_srcdir)/adm/unix/make_begin.am - -if CPPUNIT_IS_OK -SUBDIRS = Test -endif - -SWIG_PYTHON_INCLUDES = -noexcept -DYACS_PTHREAD -I$(srcdir)/../bases -I$(srcdir)/../engine_swig -I$(srcdir)/../engine \ - -I$(srcdir)/../yacsloader -I../engine_swig - -BUILT_SOURCES = loaderWRAP.cxx - -MYSWIG_FLAGS = - -if DOXYGEN_IS_OK -MYSWIG_FLAGS += -DDOXYGEN_IS_OK -endif - -LOADERINCLUDES=parsers.hxx LoadState.hxx xmlParserBase.hxx ProcCataLoader.hxx - -SWIGINCLUDES = $(LOADERINCLUDES:%=$(top_srcdir)/src/yacsloader/%) - -loaderWRAP.cxx loaderWRAP.h: loader.i $(SWIGINCLUDES) docyacsloader.i ../engine_swig/pilot.i ../engine_swig/engtypemaps.i - $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) $(MYSWIG_FLAGS) -o loaderWRAP.cxx $(srcdir)/loader.i - -loader.py : loaderWRAP.cxx - -salomepython_PYTHON = loader.py -salomepyexec_LTLIBRARIES = _loader.la - -_loader_la_SOURCES = \ - loaderWRAP.cxx - -_loader_la_CXXFLAGS = \ - $(THREAD_DEF) \ - $(PYTHON_CPPFLAGS) \ - $(OMNIORB_INCLUDES) \ - $(OMNIORB_CXXFLAGS) \ - $(EXPAT_INCLUDES) \ - -I$(srcdir)/../bases \ - -I$(srcdir)/../engine \ - -I$(srcdir)/../yacsloader - -_loader_la_LDFLAGS = -module - -_loader_la_LIBADD = ../yacsloader/libYACSloader.la $(OMNIORB_LIBS) $(PYTHON_LIBS) - -docyacsloader.i:$(SWIGINCLUDES) - DOXSRCDIR=$(top_srcdir)/src/yacsloader doxygen $(top_srcdir)/Misc/Doxyfile - $(PYTHON) $(top_srcdir)/Misc/doxy2swig.py -n xml/index.xml docyacsloader.i - -EXTRA_DIST = loader.i - -clean-local: - rm -f loader.py* loaderWRAP.cxx docyacsloader.i loaderWRAP.h - rm -rf xml - -include $(top_srcdir)/adm/unix/make_end.am diff --git a/src/yacsorb/CMakeLists.txt b/src/yacsorb/CMakeLists.txt new file mode 100644 index 000000000..2374d94b2 --- /dev/null +++ b/src/yacsorb/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +# scripts / python + +SET(_python_SCRIPTS + YACS.py + ) + +# --- rules --- + +SALOME_INSTALL_SCRIPTS("${_python_SCRIPTS}" ${SALOME_INSTALL_PYTHON}) -- 2.30.2