]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/CMakeLists.txt
Salome HOME
Corrections for extrusion/revolution xml definition and random color
[modules/shaper.git] / src / XGUI / CMakeLists.txt
1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3
4 SET(CMAKE_AUTOMOC ON)
5
6 SET(PROJECT_HEADERS
7         XGUI.h
8         XGUI_ActionsMgr.h
9         XGUI_ContextMenuMgr.h
10         XGUI_CustomPrs.h
11         XGUI_DataTreeModel.h
12         XGUI_Displayer.h
13         XGUI_DocumentDataModel.h
14         XGUI_ErrorDialog.h
15         XGUI_ModuleConnector.h
16         XGUI_ObjectsBrowser.h
17         XGUI_OperationMgr.h
18         XGUI_PartDataModel.h
19         XGUI_PropertyPanel.h
20         XGUI_QtEvents.h
21         XGUI_SalomeConnector.h
22         XGUI_Selection.h
23         XGUI_SelectionMgr.h
24         XGUI_Tools.h
25         XGUI_ViewerProxy.h
26         XGUI_Workshop.h
27         XGUI_HistoryMenu.h
28 )
29
30 SET(PROJECT_AUTOMOC 
31     ${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
32 )
33
34 SET(PROJECT_SOURCES
35         XGUI_ActionsMgr.cpp
36         XGUI_ContextMenuMgr.cpp
37         XGUI_CustomPrs.cpp
38         XGUI_Displayer.cpp
39         XGUI_DocumentDataModel.cpp
40         XGUI_ErrorDialog.cpp
41         XGUI_ModuleConnector.cpp
42         XGUI_ObjectsBrowser.cpp
43         XGUI_OperationMgr.cpp
44         XGUI_PartDataModel.cpp
45         XGUI_PropertyPanel.cpp
46         XGUI_QtEvents.cpp
47         XGUI_Selection.cpp
48         XGUI_SelectionMgr.cpp
49         XGUI_Tools.cpp
50         XGUI_ViewerProxy.cpp
51         XGUI_Workshop.cpp
52         XGUI_HistoryMenu.cpp
53 )
54
55 SET(PROJECT_RESOURCES 
56     XGUI_pictures.qrc
57 )
58
59 SET(PREFERENCES_XML
60         NewGeom.xml
61 )
62
63 SET(TEXT_RESOURCES
64         XGUI_msg_fr.ts
65 )
66
67 SET(PROJECT_LIBRARIES
68     Events
69     Config
70         ModelAPI
71         ModuleBase
72         AppElements
73         ${QT_LIBRARIES}
74         ${CAS_VIEWER}
75         ${CAS_KERNEL}
76         ${CAS_SHAPE}
77         ${PYTHON_LIBRARIES}
78         ${PyConsole}
79         ${PyInterp}
80         ${suit}
81         ${qtx}
82 )
83
84 IF(WIN32) 
85     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
86 ELSE()
87     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
88 ENDIF()
89
90 QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
91 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
92
93 QT4_CREATE_TRANSLATION(QM_RESOURCES 
94                                            ${PROJECT_SOURCES}
95                                            ${TEXT_RESOURCES}
96                                            OPTIONS -extensions cpp -no-recursive
97                                            )
98
99
100 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
101 #SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
102 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES} ${PREFERENCES_XML})
103
104 ADD_DEFINITIONS( -DXGUI_EXPORTS ${CAS_DEFINITIONS} )
105
106 INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events
107                                          ${PROJECT_SOURCE_DIR}/src/Config
108                                          ${PROJECT_SOURCE_DIR}/src/ModelAPI
109                                          ${PROJECT_SOURCE_DIR}/src/GeomAPI
110                                          ${PROJECT_SOURCE_DIR}/src/ModuleBase
111 #                                        ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
112                                          ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
113                                          ${PROJECT_SOURCE_DIR}/src/AppElements
114                                          ${CAS_INCLUDE_DIRS}
115                                          ${SUIT_INCLUDE})
116
117 LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
118
119 ADD_LIBRARY(XGUI SHARED 
120         ${PROJECT_SOURCES} 
121         ${PROJECT_HEADERS} 
122         ${PROJECT_COMPILED_RESOURCES} 
123         ${TEXT_RESOURCES}
124         ${QM_RESOURCES}
125         ${PREFERENCES_XML}
126 )
127
128 ADD_DEPENDENCIES(XGUI ModelAPI)
129
130 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
131 TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
132
133 INSTALL(TARGETS XGUI DESTINATION bin)
134 INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
135 INSTALL(FILES ${PREFERENCES_XML} DESTINATION resources)