1 # Copyright (C) 2012-2015 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})
23 SET_SOURCE_FILES_PROPERTIES(libYACS_Swig.i PROPERTIES
25 SWIG_DEFINITIONS "-shadow")
26 SET_PROPERTY(SOURCE libYACS_Swig.i PROPERTY
27 SWIG_FLAGS "-noexcept" "-DYACS_PTHREAD")
31 IF(SALOME_YACS_USE_KERNEL)
32 SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS})
33 ENDIF(SALOME_YACS_USE_KERNEL)
35 # additional include directories
39 ${CMAKE_CURRENT_SOURCE_DIR}
40 ${PROJECT_SOURCE_DIR}/src/salomegui
41 ${PROJECT_SOURCE_DIR}/src/salomewrap
42 ${OMNIORB_INCLUDE_DIR}
45 # additional preprocessor / compiler flags
49 ${OMNIORB_DEFINITIONS}
53 # libraries to link to
65 # scripts / swig wrappings
67 ${CMAKE_CURRENT_BINARY_DIR}/libYACS_Swig.py
76 ADD_CUSTOM_TARGET(doc.i
77 ${SET_CMD} DOXSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} ${SEP_CMD} ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/Doxyfile
78 COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/doxy2swig.py -n xml/index.xml doc.i
79 DEPENDS YACSGUI_Swig.hxx YACSGUI_Swig.cxx
81 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
83 ENDIF(SALOME_BUILD_DOC)
86 ADD_LIBRARY(YACS_Swig ${YACS_Swig_SOURCES})
87 TARGET_LINK_LIBRARIES(YACS_Swig ${_link_LIBRARIES})
88 INSTALL(TARGETS YACS_Swig EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
90 SWIG_ADD_MODULE(libYACS_Swig python libYACS_Swig.i YACSGUI_Swig.cxx)
91 ADD_DEPENDENCIES(_libYACS_Swig libYACS_Swig.i doc.i YACSGUI_Swig.hxx)
93 SWIG_LINK_LIBRARIES(libYACS_Swig "${_link_LIBRARIES}")
95 SET_TARGET_PROPERTIES(_libYACS_Swig PROPERTIES DEBUG_OUTPUT_NAME _libYACS_Swig_d)
98 INSTALL(TARGETS ${SWIG_MODULE_libYACS_Swig_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
100 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON})