1 # Copyright (C) 2014-2019 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
22 # additional include directories
23 INCLUDE_DIRECTORIES(${QT_INCLUDES})
25 # additional preprocessor / compiler flags
26 ADD_DEFINITIONS(${QT_DEFINITIONS})
28 SET(UPDATE_TRANSLATION OFF)
35 XGUI_ActiveControlMgr.h
36 XGUI_ActiveControlSelector.h
41 XGUI_DeflectionDialog.h
46 XGUI_FacesPanelSelector.h
51 XGUI_ModuleConnector.h
56 XGUI_PropertyPanelSelector.h
58 XGUI_SalomeConnector.h
60 XGUI_SelectionActivate.h
63 XGUI_TransparencyWidget.h
66 XGUI_WorkshopListener.h
67 XGUI_InspectionPanel.h
71 SET(PROJECT_MOC_HEADERS
73 XGUI_ActiveControlMgr.h
74 XGUI_ActiveControlSelector.h
78 XGUI_DeflectionDialog.h
83 XGUI_FacesPanelSelector.h
85 XGUI_ModuleConnector.h
90 XGUI_PropertyPanelSelector.h
92 XGUI_TransparencyWidget.h
95 XGUI_WorkshopListener.h
96 XGUI_InspectionPanel.h
99 # sources / moc wrappings
100 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
104 XGUI_ActiveControlMgr.cpp
106 XGUI_ContextMenuMgr.cpp
109 XGUI_DeflectionDialog.cpp
114 XGUI_FacesPanelSelector.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
126 XGUI_SalomeConnector.cpp
128 XGUI_SelectionActivate.cpp
129 XGUI_SelectionMgr.cpp
131 XGUI_TransparencyWidget.cpp
134 XGUI_WorkshopListener.cpp
135 XGUI_InspectionPanel.cpp
136 XGUI_CompressFiles.cpp
139 SET(PROJECT_RESOURCES
151 SET(PROJECT_LIBRARIES
157 ${OpenCASCADE_FoundationClasses_LIBRARIES}
158 ${OpenCASCADE_Visualization_LIBRARIES}
166 IF(NOT ${HAVE_SALOME})
167 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} AppElements)
168 ENDIF(NOT ${HAVE_SALOME})
172 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
174 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
177 QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
181 IF (${UPDATE_TRANSLATION})
182 SET(PROJECT_FILES ${PROJECT_SOURCES} ${ROJECT_HEADERS} )
183 QT5_CREATE_TRANSLATION(QM_RESOURCES
186 OPTIONS -extensions cpp -no-recursive
188 ELSE(${UPDATE_TRANSLATION})
189 QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
190 ENDIF(${UPDATE_TRANSLATION})
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})
197 ADD_DEFINITIONS( -DXGUI_EXPORTS ${OpenCASCADE_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS)
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}
210 INCLUDE_DIRECTORIES(${SALOME_KERNEL_INCLUDE})
211 ENDIF(${HAVE_SALOME})
213 IF(NOT ${HAVE_SALOME})
214 SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
215 ENDIF(NOT ${HAVE_SALOME})
218 message("TINSPECTOR is defined")
219 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${TKTInspectorAPI} ${TKTInspector} ${TKTreeModel} ${TKVInspector})
220 SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${TINSPECTOR_INCLUDE_DIR})
222 ADD_DEFINITIONS(-DTINSPECTOR)
225 INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
227 LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
229 ADD_LIBRARY(XGUI SHARED
232 ${PROJECT_COMPILED_RESOURCES}
239 ADD_DEPENDENCIES(XGUI ModelAPI)
241 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
242 TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
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})