Salome HOME
Merge branch 'V8_5_asterstudy'
[modules/gui.git] / src / Qtx / CMakeLists.txt
1 # Copyright (C) 2012-2016  CEA/DEN, EDF R&D, OPEN CASCADE
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 # --- options ---
23
24 # additional include directories
25 INCLUDE_DIRECTORIES(${QT_INCLUDES})
26
27 # additional preprocessor / compiler flags
28 ADD_DEFINITIONS(${QT_DEFINITIONS})
29
30 # libraries to link to
31 SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES})
32
33 # --- headers ---
34
35 # header files / to be processed by moc
36 SET(_moc_HEADERS   
37   QtxAction.h
38   QtxActionGroup.h
39   QtxActionMenuMgr.h
40   QtxActionMgr.h
41   QtxActionSet.h
42   QtxActionToolMgr.h
43   QtxBackgroundTool.h
44   QtxBiColorTool.h
45   QtxColorButton.h
46   QtxColorScale.h
47   QtxComboBox.h
48   QtxDialog.h
49   QtxDockAction.h
50   QtxDockWidget.h
51   QtxDoubleSpinBox.h
52   QtxDoubleSpinSlider.h
53   QtxFontEdit.h
54   QtxGridBox.h
55   QtxGroupBox.h
56   QtxIntSpinBox.h
57   QtxIntSpinSlider.h
58   QtxListAction.h
59   QtxLogoMgr.h
60   QtxMRUAction.h
61   QtxMainWindow.h
62   QtxMenu.h
63   QtxMultiAction.h
64   QtxNotify.h
65   QtxPagePrefMgr.h
66   QtxPathDialog.h
67   QtxPathEdit.h
68   QtxPathListEdit.h
69   QtxPopupMgr.h
70   QtxRubberBand.h
71   QtxSearchTool.h
72   QtxShortcutEdit.h
73   QtxSlider.h
74   QtxSplash.h
75   QtxToolBar.h
76   QtxToolButton.h
77   QtxToolTip.h
78   QtxTreeView.h
79   QtxValidator.h
80   QtxWorkspace.h
81   QtxWorkspaceAction.h
82   QtxWorkstack.h
83   QtxWorkstackAction.h
84 )
85
86 IF(SALOME_GUI_ENABLE_QTXWEBBROWSER)
87   SET(_moc_HEADERS ${_moc_HEADERS}  QtxWebBrowser.h)
88 ENDIF()
89
90 # obsolete files: not migrated to Qt4
91 # _moc_HEADERS << QtxListBox.h QtxTable.h
92 # TODO: migrate or remove?
93
94 # header files / no moc processing
95 SET(_other_HEADERS
96   Qtx.h
97   QtxEvalExpr.h
98   QtxMap.h
99   QtxPreferenceMgr.h
100   QtxResourceMgr.h
101   QtxTranslator.h
102 )
103
104 # header files / to install
105 SET(qtx_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
106
107 # --- resources ---
108
109 # resource files / to be processed by rcc
110 SET(_rcc_RESOURCES Qtx.qrc)
111
112 # resource files / to be processed by lrelease
113 SET(_ts_RESOURCES resources/Qtx_msg_fr.ts
114                   resources/Qtx_msg_ja.ts
115 )
116
117 # --- sources ---
118
119 # sources / moc wrappings
120 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
121
122 # sources / rcc wrappings
123 QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
124
125 # sources / static
126 SET(_other_SOURCES
127   Qtx.cxx
128   QtxAction.cxx
129   QtxActionGroup.cxx
130   QtxActionMenuMgr.cxx
131   QtxActionMgr.cxx
132   QtxActionSet.cxx
133   QtxActionToolMgr.cxx
134   QtxBackgroundTool.cxx
135   QtxBiColorTool.cxx
136   QtxColorButton.cxx
137   QtxColorScale.cxx
138   QtxComboBox.cxx
139   QtxDialog.cxx
140   QtxDockAction.cxx
141   QtxDockWidget.cxx
142   QtxDoubleSpinBox.cxx
143   QtxDoubleSpinSlider.cxx
144   QtxEvalExpr.cxx
145   QtxFontEdit.cxx
146   QtxGridBox.cxx
147   QtxGroupBox.cxx
148   QtxIntSpinBox.cxx
149   QtxIntSpinSlider.cxx
150   QtxListAction.cxx
151   QtxLogoMgr.cxx
152   QtxMRUAction.cxx
153   QtxMainWindow.cxx
154   QtxMenu.cxx
155   QtxMultiAction.cxx
156   QtxNotify.cxx
157   QtxPagePrefMgr.cxx
158   QtxPathDialog.cxx
159   QtxPathEdit.cxx
160   QtxPathListEdit.cxx
161   QtxPopupMgr.cxx
162   QtxPreferenceMgr.cxx
163   QtxResourceMgr.cxx
164   QtxRubberBand.cxx
165   QtxSearchTool.cxx
166   QtxShortcutEdit.cxx
167   QtxSlider.cxx
168   QtxSplash.cxx
169   QtxToolBar.cxx
170   QtxToolButton.cxx
171   QtxToolTip.cxx
172   QtxTranslator.cxx
173   QtxTreeView.cxx
174   QtxValidator.cxx
175   QtxWorkspace.cxx
176   QtxWorkspaceAction.cxx
177   QtxWorkstack.cxx
178   QtxWorkstackAction.cxx
179 )
180
181 IF(SALOME_GUI_ENABLE_QTXWEBBROWSER)
182   SET(_other_SOURCES ${_other_SOURCES}  QtxWebBrowser.cxx)
183 ENDIF()
184
185 # obsolete files: not migrated to Qt4
186 # _other_SOURCES << QtxListBox.cxx QtxTable.cxx
187 # TODO: migrate or remove?
188
189 # sources / to compile
190 SET(qtx_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
191
192 # --- rules ---
193
194 ADD_LIBRARY(qtx ${qtx_SOURCES})
195 TARGET_LINK_LIBRARIES(qtx ${_link_LIBRARIES})
196 INSTALL(TARGETS qtx EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
197
198 INSTALL(FILES ${qtx_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
199 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")