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