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