1 # Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
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 # additional include directories
26 ${PYTHON_INCLUDE_DIRS}
30 ${KERNEL_INCLUDE_DIRS}
32 ${MEDFILE_INCLUDE_DIRS}
34 ${OMNIORB_INCLUDE_DIR}
36 ${CMAKE_CURRENT_SOURCE_DIR}
37 ${PROJECT_SOURCE_DIR}/src/SMESHGUI
38 ${PROJECT_BINARY_DIR}/idl
41 # additional preprocessor / compiler flags
44 ${OMNIORB_DEFINITIONS}
48 # libraries to link to
50 ${KERNEL_SalomeGenericObj}
51 ${KERNEL_SALOMELocalTrace}
63 # header files / to be processed by moc
64 SET(SMESH_Swig_HEADERS
72 SET(SMESH_Swig_SOURCES
77 # workaround about SWIG_ADD_MODULE bug: remove duplicates in include directories
78 GET_DIRECTORY_PROPERTY(_cmake_include_directories INCLUDE_DIRECTORIES)
79 LIST(REMOVE_DUPLICATES _cmake_include_directories)
80 SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${_cmake_include_directories}")
83 SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES CPLUSPLUS ON)
84 SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow")
85 SET_SOURCE_FILES_PROPERTIES(libSMESH_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
89 # scripts / swig wrappings
91 ${CMAKE_CURRENT_BINARY_DIR}/libSMESH_Swig.py
96 SWIG_ADD_MODULE(libSMESH_Swig python ${SMESH_Swig_SOURCES})
97 SWIG_LINK_LIBRARIES(libSMESH_Swig ${_link_LIBRARIES})
99 SET_TARGET_PROPERTIES(_libSMESH_Swig PROPERTIES DEBUG_OUTPUT_NAME _libSMESH_Swig_d)
102 INSTALL(TARGETS _libSMESH_Swig DESTINATION ${SALOME_INSTALL_LIBS})
104 INSTALL(FILES ${SMESH_Swig_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
106 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_BINS})