Salome HOME
CMake: Removed MPI detection: GUI only needs it as a second rank
[modules/gui.git] / src / SALOME_PYQT / SALOME_PYQT_GUILight / CMakeLists.txt
1 # Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE(UsePyQt4)
21 INCLUDE(${VTK_USE_FILE})
22
23 # --- options ---
24
25 # additional include directories
26 INCLUDE_DIRECTORIES(
27   ${CAS_INCLUDE_DIRS}
28   ${QT_INCLUDES}
29   ${SIP_INCLUDE_DIR}
30   ${PYTHON_INCLUDE_DIRS}
31   ${PTHREAD_INCLUDE_DIR}
32   ${CMAKE_CURRENT_BINARY_DIR}
33   ${PROJECT_SOURCE_DIR}/src/CAM
34   ${PROJECT_SOURCE_DIR}/src/Event
35   ${PROJECT_SOURCE_DIR}/src/LightApp
36   ${PROJECT_SOURCE_DIR}/src/OCCViewer
37   ${PROJECT_SOURCE_DIR}/src/Plot2d
38   ${PROJECT_SOURCE_DIR}/src/PyConsole
39   ${PROJECT_SOURCE_DIR}/src/PyInterp
40   ${PROJECT_SOURCE_DIR}/src/Qtx
41   ${PROJECT_SOURCE_DIR}/src/STD
42   ${PROJECT_SOURCE_DIR}/src/SUIT
43   ${PROJECT_SOURCE_DIR}/src/SUITApp
44 )
45
46 # additional preprocessor / compiler flags
47 ADD_DEFINITIONS(
48   "-DCALL_OLD_METHODS"
49   ${QT_DEFINITIONS}
50   ${CAS_DEFINITIONS}
51   ${PYTHON_DEFINITIONS}
52 )
53 IF(SALOME_LIGHT_ONLY)
54   ADD_DEFINITIONS("-DGUI_DISABLE_CORBA")
55 ENDIF()
56
57 # libraries to link to
58 SET(_link_LIBRARIES
59   ${PYTHON_LIBRARIES}
60   ${VTK_LIBRARIES}
61   ${OPENGL_LIBRARIES}
62   LightApp
63 )
64 IF(NOT SALOME_LIGHT_ONLY)
65   LIST(APPEND _link_LIBRARIES ${KERNEL_SalomeContainer})
66 ENDIF()
67
68 # --- headers ---
69
70 # header files / to be processed by moc
71 SET(_moc_HEADERS   
72   SALOME_PYQT_DataModelLight.h
73   SALOME_PYQT_ModuleLight.h
74   SALOME_PYQT_PyModule.h
75 )
76
77 # header files / no moc processing
78 SET(_other_HEADERS
79   SALOME_PYQT_DataObjectLight.h
80   SALOME_PYQT_GUILight.h
81   SALOME_PYQT_PyInterp.h
82 )
83
84 # header files / to install
85 SET(SalomePyQtGUILight_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
86
87 # --- resources ---
88
89 # sip files / to be processed by sip
90 SET(_sip_files SALOME_PYQT_GUILight.sip)
91
92 # --- sources ---
93
94 # sources / moc wrappings
95 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
96
97 # sources / sip wrappings
98 PYQT4_WRAP_SIP(_sip_SOURCES ${_sip_files})
99
100 # sources / static
101 SET(_other_SOURCES
102   SALOME_PYQT_DataModelLight.cxx
103   SALOME_PYQT_DataObjectLight.cxx
104   SALOME_PYQT_ModuleLight.cxx
105   SALOME_PYQT_PyInterp.cxx
106   SALOME_PYQT_PyModule.cxx
107 )
108
109 # sources / to compile
110 SET(SalomePyQtGUILight_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_sip_SOURCES})
111
112 # --- rules ---
113
114 ADD_LIBRARY(SalomePyQtGUILight ${SalomePyQtGUILight_SOURCES})
115 TARGET_LINK_LIBRARIES(SalomePyQtGUILight ${_link_LIBRARIES})
116 INSTALL(TARGETS SalomePyQtGUILight DESTINATION ${SALOME_INSTALL_LIBS})
117
118 INSTALL(FILES ${SalomePyQtGUILight_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})