]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/CMakeLists.txt
Salome HOME
A correction to check modified value in extrusion cut/sketch/etc operations.
[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_ColorDialog.h
10         XGUI_ContextMenuMgr.h
11         XGUI_CustomPrs.h
12         XGUI_DataModel.h
13         XGUI_Displayer.h
14         XGUI_ErrorDialog.h
15         XGUI_ErrorMgr.h
16         XGUI_HistoryMenu.h
17         XGUI_ModuleConnector.h
18         XGUI_ObjectsBrowser.h
19         XGUI_OperationMgr.h
20         XGUI_PropertyPanel.h
21         XGUI_QtEvents.h
22         XGUI_SalomeConnector.h
23         XGUI_Selection.h
24         XGUI_SelectionMgr.h
25         XGUI_Tools.h
26         XGUI_ViewerProxy.h
27         XGUI_Workshop.h
28         XGUI_WorkshopListener.h
29 )
30
31 SET(PROJECT_AUTOMOC 
32     ${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
33 )
34
35 SET(PROJECT_SOURCES
36         XGUI_ActionsMgr.cpp
37         XGUI_ColorDialog.cpp
38         XGUI_ContextMenuMgr.cpp
39         XGUI_CustomPrs.cpp
40         XGUI_DataModel.cpp
41         XGUI_Displayer.cpp
42         XGUI_ErrorDialog.cpp
43         XGUI_ErrorMgr.cpp
44         XGUI_HistoryMenu.cpp
45         XGUI_ModuleConnector.cpp
46         XGUI_ObjectsBrowser.cpp
47         XGUI_OperationMgr.cpp
48         XGUI_PropertyPanel.cpp
49         XGUI_QtEvents.cpp
50         XGUI_SalomeConnector.cpp
51         XGUI_Selection.cpp
52         XGUI_SelectionMgr.cpp
53         XGUI_Tools.cpp
54         XGUI_ViewerProxy.cpp
55         XGUI_Workshop.cpp
56         XGUI_WorkshopListener.cpp
57 )
58
59 SET(PROJECT_RESOURCES 
60     XGUI_pictures.qrc
61 )
62
63 SET(PREFERENCES_XML
64         NewGeom.xml
65 )
66
67 SET(TEXT_RESOURCES
68         XGUI_msg_fr.ts
69 )
70
71 SET(PROJECT_LIBRARIES
72     Events
73     Config
74         ModelAPI
75         ModuleBase
76         ${QT_LIBRARIES}
77         ${CAS_VIEWER}
78         ${CAS_KERNEL}
79         ${CAS_SHAPE}
80         ${PYTHON_LIBRARIES}
81         ${PyConsole}
82         ${PyInterp}
83         ${suit}
84         ${qtx}
85 )
86
87 IF(NOT ${HAVE_SALOME})
88     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} AppElements)
89 ENDIF(NOT ${HAVE_SALOME})
90
91
92 IF(WIN32) 
93     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
94 ELSE()
95     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
96 ENDIF()
97
98 QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
99 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
100
101 QT4_CREATE_TRANSLATION(QM_RESOURCES 
102                                            ${PROJECT_SOURCES}
103                                            ${TEXT_RESOURCES}
104                                            OPTIONS -extensions cpp -no-recursive
105                                            )
106
107
108 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
109 #SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
110 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES} ${PREFERENCES_XML})
111
112 ADD_DEFINITIONS( -DXGUI_EXPORTS ${CAS_DEFINITIONS} )
113
114 SET(PROJECT_INCLUDES 
115     ${PROJECT_SOURCE_DIR}/src/Events
116     ${PROJECT_SOURCE_DIR}/src/Config
117     ${PROJECT_SOURCE_DIR}/src/ModelAPI
118     ${PROJECT_SOURCE_DIR}/src/GeomAPI
119     ${PROJECT_SOURCE_DIR}/src/ModuleBase
120     ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
121     ${CAS_INCLUDE_DIRS}
122     ${SUIT_INCLUDE})
123
124 IF(NOT ${HAVE_SALOME})
125     SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${PROJECT_SOURCE_DIR}/src/AppElements)
126 ENDIF(NOT ${HAVE_SALOME})
127
128 INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
129                          
130 LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
131
132 ADD_LIBRARY(XGUI SHARED 
133         ${PROJECT_SOURCES} 
134         ${PROJECT_HEADERS} 
135         ${PROJECT_COMPILED_RESOURCES} 
136         ${TEXT_RESOURCES}
137         ${QM_RESOURCES}
138         ${PREFERENCES_XML}
139 )
140
141 ADD_DEPENDENCIES(XGUI ModelAPI)
142
143 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
144 TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
145
146 INSTALL(TARGETS XGUI DESTINATION bin)
147 INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
148 INSTALL(FILES ${PREFERENCES_XML} DESTINATION resources)