1 # Copyright (C) 2014-2023 CEA, EDF
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
40 XGUI_DeflectionDialog.h
45 XGUI_FacesPanelSelector.h
50 XGUI_ModuleConnector.h
55 XGUI_PropertyPanelSelector.h
57 XGUI_SalomeConnector.h
59 XGUI_SelectionActivate.h
62 XGUI_TransparencyWidget.h
65 XGUI_WorkshopListener.h
66 XGUI_InspectionPanel.h
70 SET(PROJECT_MOC_HEADERS
72 XGUI_ActiveControlMgr.h
73 XGUI_ActiveControlSelector.h
77 XGUI_DeflectionDialog.h
82 XGUI_FacesPanelSelector.h
84 XGUI_ModuleConnector.h
89 XGUI_PropertyPanelSelector.h
91 XGUI_TransparencyWidget.h
94 XGUI_WorkshopListener.h
95 XGUI_InspectionPanel.h
98 # sources / moc wrappings
99 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
103 XGUI_ActiveControlMgr.cpp
105 XGUI_ContextMenuMgr.cpp
107 XGUI_DeflectionDialog.cpp
112 XGUI_FacesPanelSelector.cpp
116 XGUI_MenuWorkbench.cpp
117 XGUI_ModuleConnector.cpp
118 XGUI_ObjectsBrowser.cpp
119 XGUI_OperationMgr.cpp
120 XGUI_PropertyDialog.cpp
121 XGUI_PropertyPanel.cpp
122 XGUI_PropertyPanelSelector.cpp
124 XGUI_SalomeConnector.cpp
126 XGUI_SelectionActivate.cpp
127 XGUI_SelectionMgr.cpp
129 XGUI_TransparencyWidget.cpp
132 XGUI_WorkshopListener.cpp
133 XGUI_InspectionPanel.cpp
134 XGUI_CompressFiles.cpp
137 SET(PROJECT_RESOURCES
149 SET(PROJECT_LIBRARIES
155 ${OpenCASCADE_FoundationClasses_LIBRARIES}
156 ${OpenCASCADE_Visualization_LIBRARIES}
164 IF(NOT ${HAVE_SALOME})
165 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} AppElements)
166 ENDIF(NOT ${HAVE_SALOME})
170 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
172 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
175 QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
179 IF (${UPDATE_TRANSLATION})
180 SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} )
181 QT5_CREATE_TRANSLATION(QM_RESOURCES
184 OPTIONS -extensions cpp -no-recursive -locations none
186 ELSE(${UPDATE_TRANSLATION})
187 IF(${MAKE_TRANSLATION})
188 QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
189 ENDIF(${MAKE_TRANSLATION})
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/ExchangePlugin
203 ${PROJECT_SOURCE_DIR}/src/ModelAPI
204 ${PROJECT_SOURCE_DIR}/src/GeomAPI
205 ${PROJECT_SOURCE_DIR}/src/ModuleBase
206 ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
207 ${PROJECT_SOURCE_DIR}/src/Model
208 ${OpenCASCADE_INCLUDE_DIR}
211 IF(NOT ${HAVE_SALOME})
212 SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
213 ENDIF(NOT ${HAVE_SALOME})
216 message("TINSPECTOR is defined")
217 SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${TKTInspectorAPI} ${TKTInspector} ${TKTreeModel} ${TKVInspector})
218 SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${TINSPECTOR_INCLUDE_DIR})
220 ADD_DEFINITIONS(-DTINSPECTOR)
223 INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
225 LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
227 ADD_LIBRARY(XGUI SHARED
230 ${PROJECT_COMPILED_RESOURCES}
237 ADD_DEPENDENCIES(XGUI ModelAPI)
239 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
240 TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
242 INSTALL(TARGETS XGUI DESTINATION ${SHAPER_INSTALL_BIN})
243 INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
244 INSTALL(FILES ${PREFERENCES_XML} DESTINATION ${SHAPER_INSTALL_RESOURCES})
245 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_RESOURCES})