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