source: trunk/src/tests/core/CMakeLists.txt @ 367

Last change on this file since 367 was 367, checked in by Joachim Langenbach, 6 years ago

Added Test for EPluginLoader

File size: 6.7 KB
Line 
1######################
2#
3#    Copyright (C) 2010 - 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
4#
5#    This library is free software; you can redistribute it and/or
6#    modify it under the terms of the GNU Lesser General Public
7#    License as published by the Free Software Foundation; either
8#    version 2.1 of the License, or (at your option) any later version.
9#
10#    This library is distributed in the hope that it will be useful,
11#    but WITHOUT ANY WARRANTY; without even the implied warranty of
12#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13#    Lesser General Public License for more details.
14#
15#    You should have received a copy of the GNU Lesser General Public
16#    License along with this library; if not, write to the Free Software
17#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18#    MA 02110-1301  USA.
19#
20######################
21
22ADD_SUBDIRECTORY(exmlmodel)
23ADD_SUBDIRECTORY(efiledialog)
24ADD_SUBDIRECTORY(emainwindow)
25ADD_SUBDIRECTORY(emimetypes)
26ADD_SUBDIRECTORY(sqltests)
27ADD_SUBDIRECTORY(ecmdlinetests)
28ADD_SUBDIRECTORY(efileservicetests)
29ADD_SUBDIRECTORY(ewidget)
30ADD_SUBDIRECTORY(elogobject)
31ADD_SUBDIRECTORY(espreadsheets)
32
33IF(BINDINGS_QT4)
34  SET(QT_USE_QTTEST TRUE)
35ENDIF(BINDINGS_QT4)
36
37INCLUDE_DIRECTORIES(
38        ${CMAKE_CURRENT_BINARY_DIR}
39        ${CMAKE_CURRENT_SOURCE_DIR}
40        ${libengsas_SOURCE_DIR}
41        ${libengsas_BINARY_DIR}
42        ${libengsas_testing_SOURCE_DIR}
43        ${libengsas_testing_BINARY_DIR}
44)
45IF(BINDINGS_QT4)
46        # QT5 does not declare and does not need QT_INCLUDES
47        SET(INCLUDE_DIRECTORIES ${INCLUDES_DIRECTORIES} ${QT_INCLUDES})
48        INCLUDE(${QT_USE_FILE})
49ENDIF(BINDINGS_QT4)
50
51ADD_DEFINITIONS(${QT_DEFINITIONS})
52
53#######################
54#
55# EObject Test
56#
57#######################
58
59SET(test_CPP
60        eobjecttest.cpp
61)
62
63ADD_EXECUTABLE(testeobject ${test_CPP})
64TARGET_LINK_LIBRARIES(testeobject ${QT_LIBRARIES} libengsas)
65IF(BINDINGS_QT5)
66        qt5_use_modules(testeobject Core Test)
67ENDIF(BINDINGS_QT5)
68ADD_TEST(TestEObject ${EXECUTABLE_OUTPUT_PATH}/testeobject)
69
70#######################
71#
72# EDialog Test
73#
74#######################
75
76SET(test_CPP
77        edialogtest.cpp
78)
79
80ADD_EXECUTABLE(testedialog ${test_CPP})
81TARGET_LINK_LIBRARIES(testedialog ${QT_LIBRARIES} libengsas libengsas_testing)
82IF(BINDINGS_QT5)
83        qt5_use_modules(testedialog Core Test)
84ENDIF(BINDINGS_QT5)
85ADD_TEST(TestEDialog ${EXECUTABLE_OUTPUT_PATH}/testedialog)
86
87#######################
88#
89# ESettingsWidget Test
90#
91#######################
92
93SET(test_CPP
94        esettingswidgettest.cpp
95)
96
97ADD_EXECUTABLE(testesettingswidget ${test_CPP})
98TARGET_LINK_LIBRARIES(testesettingswidget ${QT_LIBRARIES} libengsas)
99IF(BINDINGS_QT5)
100        qt5_use_modules(testesettingswidget Core Test)
101ENDIF(BINDINGS_QT5)
102ADD_TEST(TestESettingsWidget ${EXECUTABLE_OUTPUT_PATH}/testesettingswidget)
103
104#######################
105#
106# ESettingsModel Test
107#
108#######################
109
110SET(test_CPP
111        esettingsmodeltest.cpp
112        #${libengsas_SOURCE_DIR}/esettingsmodel.cpp
113)
114
115ADD_EXECUTABLE(testesettingsmodel ${test_CPP})
116TARGET_LINK_LIBRARIES(testesettingsmodel ${QT_LIBRARIES} libengsas libengsas_testing)
117IF(BINDINGS_QT5)
118        qt5_use_modules(testesettingsmodel Core Test)
119ENDIF(BINDINGS_QT5)
120ADD_TEST(TestESettingsModel ${EXECUTABLE_OUTPUT_PATH}/testesettingsmodel)
121
122#######################
123#
124# EAction Test
125#
126#######################
127
128SET(test_CPP
129        eactiontest.cpp
130)
131
132IF(BINDINGS_QT4)
133  QT4_ADD_RESOURCES(libengsas_RCCS ${libengsas_SOURCE_DIR}/icons/iconset.qrc)
134ENDIF(BINDINGS_QT4)
135IF(BINDINGS_QT5)
136  QT5_ADD_RESOURCES(libengsas_RCCS ${libengsas_SOURCE_DIR}/icons/iconset.qrc)
137ENDIF(BINDINGS_QT5)
138
139ADD_EXECUTABLE(testeaction ${test_CPP} ${libengsas_RCCS})
140TARGET_LINK_LIBRARIES(testeaction ${QT_LIBRARIES} libengsas)
141IF(BINDINGS_QT5)
142        qt5_use_modules(testeaction Core Test)
143ENDIF(BINDINGS_QT5)
144ADD_TEST(TestEAction ${EXECUTABLE_OUTPUT_PATH}/testeaction)
145
146#######################
147#
148# EPushButton Test
149#
150#######################
151
152SET(test_CPP
153        epushbuttontest.cpp
154)
155
156IF(BINDINGS_QT4)
157  QT4_ADD_RESOURCES(libengsas_RCCS ${libengsas_SOURCE_DIR}/icons/iconset.qrc)
158ENDIF(BINDINGS_QT4)
159IF(BINDINGS_QT5)
160  QT5_ADD_RESOURCES(libengsas_RCCS ${libengsas_SOURCE_DIR}/icons/iconset.qrc)
161ENDIF(BINDINGS_QT5)
162
163ADD_EXECUTABLE(testepushbutton ${test_CPP} ${libengsas_RCCS})
164TARGET_LINK_LIBRARIES(testepushbutton ${QT_LIBRARIES} libengsas)
165IF(BINDINGS_QT5)
166        qt5_use_modules(testepushbutton Core Test)
167ENDIF(BINDINGS_QT5)
168ADD_TEST(TestEPushButton ${EXECUTABLE_OUTPUT_PATH}/testepushbutton)
169
170###################################
171#                                 #
172#  ETableView tests               #
173#                                 #
174###################################
175SET(test_CPP etableviewtest.cpp)
176ADD_EXECUTABLE(testetableview ${test_CPP})
177TARGET_LINK_LIBRARIES(testetableview
178        ${QT_LIBRARIES}
179        libengsas
180)
181IF(BINDINGS_QT5)
182        qt5_use_modules(testetableview Core Test)
183ENDIF(BINDINGS_QT5)
184ADD_TEST(TestETableView ${EXECUTABLE_OUTPUT_PATH}/testetableview)
185
186###################################
187#                                 #
188#  EAboutModel tests              #
189#                                 #
190###################################
191SET(test_CPP
192        eaboutmodeltest.cpp
193        handlestrings.cpp
194)
195ADD_EXECUTABLE(testeaboutmodel ${test_CPP})
196TARGET_LINK_LIBRARIES(testeaboutmodel
197        ${QT_LIBRARIES}
198        libengsas
199        libengsas_testing
200)
201IF(BINDINGS_QT5)
202        qt5_use_modules(testeaboutmodel Core Test)
203ENDIF(BINDINGS_QT5)
204ADD_TEST(TestEAboutModel ${EXECUTABLE_OUTPUT_PATH}/testeaboutmodel)
205
206###################################
207#                                 #
208#  Version tests                  #
209#                                 #
210###################################
211SET(test_CPP
212        versiontest.cpp
213        ${libengsas_SOURCE_DIR}/internal/version.cpp
214)
215ADD_EXECUTABLE(testversion ${test_CPP})
216TARGET_LINK_LIBRARIES(testversion
217        ${QT_LIBRARIES}
218        libengsas
219)
220IF(BINDINGS_QT5)
221        qt5_use_modules(testversion Core Test)
222ENDIF(BINDINGS_QT5)
223ADD_TEST(TestVersion ${EXECUTABLE_OUTPUT_PATH}/testversion)
224
225###################################
226#                                 #
227#  ERibbon tests                  #
228#                                 #
229###################################
230SET(test_CPP
231        eribbontest.cpp
232)
233ADD_EXECUTABLE(testeribbon ${test_CPP})
234TARGET_LINK_LIBRARIES(testeribbon
235        ${QT_LIBRARIES}
236        libengsas
237)
238IF(BINDINGS_QT5)
239        qt5_use_modules(testeribbon Core Test)
240ENDIF(BINDINGS_QT5)
241ADD_TEST(TestERibbon ${EXECUTABLE_OUTPUT_PATH}/testeribbon)
242
243###################################
244#                                 #
245#  EPluginLoader tests            #
246#                                 #
247###################################
248SET(test_CPP
249        epluginloadertest.cpp
250)
251ADD_EXECUTABLE(testepluginloader ${test_CPP})
252TARGET_LINK_LIBRARIES(testepluginloader
253        ${QT_LIBRARIES}
254        libengsas
255)
256IF(BINDINGS_QT5)
257        qt5_use_modules(testepluginloader Core Test)
258ENDIF(BINDINGS_QT5)
259ADD_TEST(TestEPluginLoader ${EXECUTABLE_OUTPUT_PATH}/testepluginloader)
Note: See TracBrowser for help on using the repository browser.