]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/CMakeLists.txt
Salome HOME
Remove French translations
[modules/shaper.git] / src / XGUI / CMakeLists.txt
1 # Copyright (C) 2014-2019  CEA/DEN, EDF R&D
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, or (at your option) any later version.
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(UseQtExt)
21
22 # additional include directories
23 INCLUDE_DIRECTORIES(${QT_INCLUDES})
24
25 # additional preprocessor / compiler flags
26 ADD_DEFINITIONS(${QT_DEFINITIONS})
27
28 SET(UPDATE_TRANSLATION OFF)
29
30
31
32 SET(PROJECT_HEADERS
33     XGUI.h
34     XGUI_ActionsMgr.h
35     XGUI_ActiveControlMgr.h
36     XGUI_ActiveControlSelector.h
37     XGUI_ColorDialog.h
38     XGUI_ContextMenuMgr.h
39     XGUI_CustomPrs.h
40     XGUI_DataModel.h
41     XGUI_DeflectionDialog.h
42     XGUI_Displayer.h
43     XGUI_ErrorDialog.h
44     XGUI_ErrorMgr.h
45     XGUI_FacesPanel.h
46     XGUI_FacesPanelSelector.h
47     XGUI_HistoryMenu.h
48     XGUI_MenuGroup.h
49     XGUI_MenuMgr.h
50     XGUI_MenuWorkbench.h
51     XGUI_ModuleConnector.h
52     XGUI_ObjectsBrowser.h
53     XGUI_OperationMgr.h
54     XGUI_PropertyDialog.h
55     XGUI_PropertyPanel.h
56     XGUI_PropertyPanelSelector.h
57     XGUI_QtEvents.h
58     XGUI_SalomeConnector.h
59     XGUI_Selection.h
60     XGUI_SelectionActivate.h
61     XGUI_SelectionMgr.h
62     XGUI_Tools.h
63     XGUI_TransparencyWidget.h
64     XGUI_ViewerProxy.h
65     XGUI_Workshop.h
66     XGUI_WorkshopListener.h
67         XGUI_InspectionPanel.h
68         XGUI_CompressFiles.h
69 )
70
71 SET(PROJECT_MOC_HEADERS
72     XGUI_ActionsMgr.h
73     XGUI_ActiveControlMgr.h
74     XGUI_ActiveControlSelector.h
75     XGUI_ColorDialog.h
76     XGUI_ContextMenuMgr.h
77     XGUI_DataModel.h
78     XGUI_DeflectionDialog.h
79     XGUI_Displayer.h
80     XGUI_ErrorDialog.h
81     XGUI_ErrorMgr.h
82     XGUI_FacesPanel.h
83     XGUI_FacesPanelSelector.h
84     XGUI_HistoryMenu.h
85     XGUI_ModuleConnector.h
86     XGUI_ObjectsBrowser.h
87     XGUI_OperationMgr.h
88     XGUI_PropertyDialog.h
89     XGUI_PropertyPanel.h
90     XGUI_PropertyPanelSelector.h
91     XGUI_SelectionMgr.h
92     XGUI_TransparencyWidget.h
93     XGUI_ViewerProxy.h
94     XGUI_Workshop.h
95     XGUI_WorkshopListener.h
96         XGUI_InspectionPanel.h
97 )
98
99 # sources / moc wrappings
100 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
101
102 SET(PROJECT_SOURCES
103     XGUI_ActionsMgr.cpp
104     XGUI_ActiveControlMgr.cpp
105     XGUI_ColorDialog.cpp
106     XGUI_ContextMenuMgr.cpp
107     XGUI_CustomPrs.cpp
108     XGUI_DataModel.cpp
109     XGUI_DeflectionDialog.cpp
110     XGUI_Displayer.cpp
111     XGUI_ErrorDialog.cpp
112     XGUI_ErrorMgr.cpp
113     XGUI_FacesPanel.cpp
114     XGUI_FacesPanelSelector.cpp
115     XGUI_HistoryMenu.cpp
116     XGUI_MenuGroup.cpp
117     XGUI_MenuMgr.cpp
118     XGUI_MenuWorkbench.cpp
119     XGUI_ModuleConnector.cpp
120     XGUI_ObjectsBrowser.cpp
121     XGUI_OperationMgr.cpp
122     XGUI_PropertyDialog.cpp
123     XGUI_PropertyPanel.cpp
124     XGUI_PropertyPanelSelector.cpp
125     XGUI_QtEvents.cpp
126     XGUI_SalomeConnector.cpp
127     XGUI_Selection.cpp
128     XGUI_SelectionActivate.cpp
129     XGUI_SelectionMgr.cpp
130     XGUI_Tools.cpp
131     XGUI_TransparencyWidget.cpp
132     XGUI_ViewerProxy.cpp
133     XGUI_Workshop.cpp
134     XGUI_WorkshopListener.cpp
135         XGUI_InspectionPanel.cpp
136         XGUI_CompressFiles.cpp
137 )
138
139 SET(PROJECT_RESOURCES
140     XGUI_pictures.qrc
141 )
142
143 SET(PREFERENCES_XML
144     SHAPER.xml
145 )
146
147 SET(TEXT_RESOURCES
148 #    XGUI_msg_fr.ts
149 )
150
151 SET(PROJECT_LIBRARIES
152     Events
153     Config
154     ModelAPI
155     ModuleBase
156     ${QT_LIBRARIES}
157     ${OpenCASCADE_FoundationClasses_LIBRARIES}
158     ${OpenCASCADE_Visualization_LIBRARIES}
159     ${PYTHON_LIBRARIES}
160     ${PyConsole}
161     ${PyInterp}
162     ${suit}
163     ${qtx}
164 )
165
166 IF(NOT ${HAVE_SALOME})
167     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} AppElements)
168 ENDIF(NOT ${HAVE_SALOME})
169
170
171 IF(WIN32)
172     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
173 ELSE()
174     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
175 ENDIF()
176
177 QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
178
179
180
181 IF (${UPDATE_TRANSLATION})
182     SET(PROJECT_FILES ${PROJECT_SOURCES} ${ROJECT_HEADERS} )
183     QT5_CREATE_TRANSLATION(QM_RESOURCES
184                            ${PROJECT_FILES}
185                            ${TEXT_RESOURCES}
186                            OPTIONS -extensions cpp -no-recursive
187                           )
188 ELSE(${UPDATE_TRANSLATION})
189     QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
190 ENDIF(${UPDATE_TRANSLATION})
191
192
193 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
194 #SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
195 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES} ${PREFERENCES_XML})
196
197 ADD_DEFINITIONS( -DXGUI_EXPORTS ${OpenCASCADE_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS)
198
199 SET(PROJECT_INCLUDES
200     ${PROJECT_SOURCE_DIR}/src/Events
201     ${PROJECT_SOURCE_DIR}/src/Config
202     ${PROJECT_SOURCE_DIR}/src/ModelAPI
203     ${PROJECT_SOURCE_DIR}/src/GeomAPI
204     ${PROJECT_SOURCE_DIR}/src/ModuleBase
205     ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
206     ${OpenCASCADE_INCLUDE_DIR}
207     ${SUIT_INCLUDE})
208
209 IF(${HAVE_SALOME})
210   INCLUDE_DIRECTORIES(${SALOME_KERNEL_INCLUDE})
211 ENDIF(${HAVE_SALOME})
212
213 IF(NOT ${HAVE_SALOME})
214     SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
215 ENDIF(NOT ${HAVE_SALOME})
216
217 IF(TKTInspector)
218     message("TINSPECTOR is defined")
219     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${TKTInspectorAPI} ${TKTInspector} ${TKTreeModel} ${TKVInspector})
220     SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${TINSPECTOR_INCLUDE_DIR})
221
222     ADD_DEFINITIONS(-DTINSPECTOR)
223 ENDIF()
224
225 INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
226
227 LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
228
229 ADD_LIBRARY(XGUI SHARED
230     ${PROJECT_SOURCES}
231     ${PROJECT_HEADERS}
232     ${PROJECT_COMPILED_RESOURCES}
233     ${TEXT_RESOURCES}
234     ${QM_RESOURCES}
235     ${PREFERENCES_XML}
236     ${PROJECT_AUTOMOC}
237 )
238
239 ADD_DEPENDENCIES(XGUI ModelAPI)
240
241 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
242 TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
243
244 INSTALL(TARGETS XGUI DESTINATION ${SHAPER_INSTALL_BIN})
245 INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
246 INSTALL(FILES ${PREFERENCES_XML} DESTINATION ${SHAPER_INSTALL_RESOURCES})
247 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_RESOURCES})