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