1 # Copyright (C) 2012-2015 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
22 IF(SALOME_USE_VTKVIEWER)
23 INCLUDE(${VTK_USE_FILE})
28 # additional include directories
35 ${PYTHON_INCLUDE_DIRS}
36 ${CMAKE_CURRENT_SOURCE_DIR}
37 ${PROJECT_SOURCE_DIR}/src/CAM
38 ${PROJECT_SOURCE_DIR}/src/Event
39 ${PROJECT_SOURCE_DIR}/src/LightApp
40 ${PROJECT_SOURCE_DIR}/src/LogWindow
41 ${PROJECT_SOURCE_DIR}/src/OBJECT
42 ${PROJECT_SOURCE_DIR}/src/ObjBrowser
43 ${PROJECT_SOURCE_DIR}/src/PyInterp
44 ${PROJECT_SOURCE_DIR}/src/PyConsole
45 ${PROJECT_SOURCE_DIR}/src/SalomePyConsole
46 ${PROJECT_SOURCE_DIR}/src/Qtx
47 ${PROJECT_SOURCE_DIR}/src/SALOME_PYQT/SALOME_PYQT_GUILight
48 ${PROJECT_SOURCE_DIR}/src/STD
49 ${PROJECT_SOURCE_DIR}/src/SUIT
52 IF(SALOME_USE_OCCVIEWER)
53 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OCCViewer)
54 ENDIF(SALOME_USE_OCCVIEWER)
55 IF(SALOME_USE_PVVIEWER)
56 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/PVViewer)
57 ENDIF(SALOME_USE_PVVIEWER)
58 IF(SALOME_USE_PLOT2DVIEWER)
59 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Plot2d)
60 ELSE(SALOME_USE_PLOT2DVIEWER)
61 #disable 'ENABLE_PLOT2D' feature
62 SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} "-xENABLE_PLOT2D;")
63 ENDIF(SALOME_USE_PLOT2DVIEWER)
66 #disable 'ENABLE_CORBA' feature
67 SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} "-xENABLE_CORBA;")
68 ELSE(SALOME_LIGHT_ONLY)
70 ${PROJECT_SOURCE_DIR}/src/SalomeApp
72 ENDIF(SALOME_LIGHT_ONLY)
74 # additional preprocessor / compiler flags
81 ${OMNIORB_DEFINITIONS}
84 # libraries to link to
95 # header files / to be processed by moc
96 SET(_moc_HEADERS SalomePyQt.h)
100 # sip files / to be processed by sip
101 SET(_sip_files SalomePyQt.sip)
102 IF(SALOME_USE_PLOT2DVIEWER)
103 LIST(APPEND _sip_files SalomePyQt_Plot2d.sip)
104 ENDIF(SALOME_USE_PLOT2DVIEWER)
108 # sources / moc wrappings
109 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
111 # sources / sip wrappings
112 PYQT_WRAP_SIP(_sip_SOURCES ${_sip_files})
115 SET(_other_SOURCES SalomePyQt.cxx)
117 # sources / to compile
118 SET(SalomePyQt_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_sip_SOURCES})
122 ADD_LIBRARY(SalomePyQt ${SalomePyQt_SOURCES})
123 TARGET_LINK_LIBRARIES(SalomePyQt ${_link_LIBRARIES})
124 INSTALL(TARGETS SalomePyQt DESTINATION ${SALOME_INSTALL_LIBS})
127 SET_TARGET_PROPERTIES(SalomePyQt PROPERTIES SUFFIX ".pyd" DEBUG_OUTPUT_NAME SalomePyQt_d RELEASE_OUTPUT_NAME SalomePyQt)
129 SET_TARGET_PROPERTIES(SalomePyQt PROPERTIES PREFIX "")
132 FILE(GLOB make_clean_files ${CMAKE_CURRENT_BINARY_DIR}/sip*)
133 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}")