1 # Copyright (C) 2012-2016 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 INCLUDE(${SWIG_USE_FILE})
22 IF(SALOME_BUILD_TESTS)
23 ADD_SUBDIRECTORY(Test)
24 ENDIF(SALOME_BUILD_TESTS)
28 # additional include directories
30 ${PROJECT_SOURCE_DIR}/src/bases
31 ${PROJECT_SOURCE_DIR}/src/engine
32 ${PROJECT_SOURCE_DIR}/src/engine_swig
33 ${PROJECT_SOURCE_DIR}/src/yacsloader
34 ${PROJECT_BINARY_DIR}/src/engine_swig
35 ${OMNIORB_INCLUDE_DIR}
36 ${OMNIORBPY_INCLUDE_DIR}
37 ${PYTHON_INCLUDE_DIRS}
41 SET_SOURCE_FILES_PROPERTIES(loader.i PROPERTIES
43 SWIG_DEFINITIONS "-shadow")
44 SET_PROPERTY(SOURCE loader.i PROPERTY
45 SWIG_FLAGS "-noexcept" "-DYACS_PTHREAD")
47 # additional preprocessor / compiler flags
50 ${OMNIORB_DEFINITIONS}
53 # libraries to link to
61 # scripts / swig wrappings
63 ${CMAKE_CURRENT_BINARY_DIR}/loader.py
72 ADD_CUSTOM_TARGET(docyacsloader.i
73 ${SET_CMD} DOXSRCDIR=${PROJECT_SOURCE_DIR}/src/yacsloader ${SEP_CMD} ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/Doxyfile
74 COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/doxy2swig.py -n xml/index.xml docyacsloader.i
76 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
78 ENDIF(SALOME_BUILD_DOC)
82 ${PROJECT_SOURCE_DIR}/src/yacsloader/parsers.hxx
83 ${PROJECT_SOURCE_DIR}/src/yacsloader/LoadState.hxx
84 ${PROJECT_SOURCE_DIR}/src/yacsloader/xmlParserBase.hxx
85 ${PROJECT_SOURCE_DIR}/src/yacsloader/ProcCataLoader.hxx
88 SET(SWIG_MODULE_loader_EXTRA_DEPS
89 ${PROJECT_SOURCE_DIR}/src/engine_swig/pilot.i
90 ${PROJECT_SOURCE_DIR}/src/engine_swig/engtypemaps.i
92 SWIG_ADD_MODULE(loader python loader.i)
94 SWIG_LINK_LIBRARIES(loader ${_link_LIBRARIES})
96 SET_TARGET_PROPERTIES(_loader PROPERTIES DEBUG_OUTPUT_NAME _loader_d)
99 INSTALL(TARGETS ${SWIG_MODULE_loader_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
101 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON})