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})
24 IF(WIN32) # if platform is Windows 64 bit
25 IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
26 ADD_DEFINITIONS(/bigobj) # to avoid error C1128
30 # additional include directories
32 ${PTHREAD_INCLUDE_DIR}
33 ${OMNIORB_INCLUDE_DIR}
34 ${PYTHON_INCLUDE_DIRS}
35 ${PROJECT_BINARY_DIR}/idl
37 ${PROJECT_SOURCE_DIR}/src/bases
38 ${PROJECT_SOURCE_DIR}/src/engine
39 ${CMAKE_CURRENT_SOURCE_DIR}
40 ${CMAKE_CURRENT_BINARY_DIR}
44 SET_SOURCE_FILES_PROPERTIES(pilot.i pypilot.i PROPERTIES
46 SWIG_DEFINITIONS "-shadow")
47 SET_PROPERTY(SOURCE pilot.i pypilot.i PROPERTY
48 SWIG_FLAGS "-noexcept" "-DYACS_PTHREAD")
50 # additional preprocessor / compiler flags
53 ${OMNIORB_DEFINITIONS}
56 # libraries to link to
80 # scripts / swig wrappings
82 ${CMAKE_CURRENT_BINARY_DIR}/pilot.py
83 ${CMAKE_CURRENT_BINARY_DIR}/pypilot.py
92 ADD_CUSTOM_TARGET(docengine.i
93 ${SET_CMD} DOXSRCDIR=${PROJECT_SOURCE_DIR}/src/engine ${SEP_CMD} ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/Doxyfile
94 COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Misc/doxy2swig.py -n xml/index.xml docengine.i
96 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
98 ENDIF(SALOME_BUILD_DOC)
102 FOREACH(f ${YACSlibEngine_HEADERS}) # defined in src/engine/CMakeLists.txt
103 LIST(APPEND ENGINEINCL ${PROJECT_SOURCE_DIR}/src/engine/${f})
106 SET(SWIGINCLUDES ${ENGINEINCL}
107 "${PROJECT_SOURCE_DIR}/src/bases/yacsconfig.h"
110 SET(SWIG_MODULE_pilot_EXTRA_DEPS engtypemaps.i ${SWIGINCLUDES})
111 SWIG_ADD_MODULE(pilot python pilot.i ExecutorSwig.cxx)
113 SET(SWIG_MODULE_pypilot_EXTRA_DEPS pilot.i engtypemaps.i _pilot ${SWIGINCLUDES})
114 SWIG_ADD_MODULE(pypilot python pypilot.i)
116 SWIG_LINK_LIBRARIES(pilot "${_link_LIBRARIES}")
117 SWIG_LINK_LIBRARIES(pypilot "${_link_LIBRARIES}")
119 SET_TARGET_PROPERTIES(_pilot PROPERTIES DEBUG_OUTPUT_NAME _pilot_d)
120 SET_TARGET_PROPERTIES(_pypilot PROPERTIES DEBUG_OUTPUT_NAME _pypilot_d)
123 INSTALL(TARGETS ${SWIG_MODULE_pilot_REAL_NAME} ${SWIG_MODULE_pypilot_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
125 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON})