forked from Stellarium/stellarium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
647 lines (595 loc) · 22.5 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
#add our external dependencies first
add_subdirectory(external)
IF(ENABLE_SPOUT)
SET(spout_SRCS
external/SpoutLibrary.h
core/SpoutSender.hpp
core/SpoutSender.cpp
)
ENDIF()
SET(stellarium_lib_SRCS
core/Dithering.hpp
core/healpix.c
core/StelAudioMgr.hpp
core/StelAudioMgr.cpp
core/StelVideoMgr.hpp
core/StelVideoMgr.cpp
core/StelGeodesicGrid.cpp
core/StelGeodesicGrid.hpp
core/StelMovementMgr.cpp
core/StelMovementMgr.hpp
core/StelObserver.cpp
core/StelObserver.hpp
core/StelLocation.hpp
core/StelLocation.cpp
core/StelLocationMgr.hpp
core/StelLocationMgr_p.hpp
core/StelLocationMgr.cpp
core/StelProjector.cpp
core/StelProjector.hpp
core/StelProjectorClasses.cpp
core/StelProjectorClasses.hpp
core/StelProjectorType.hpp
core/StelSkyDrawer.cpp
core/StelSkyDrawer.hpp
core/StelPainter.hpp
core/StelPainter.cpp
core/MultiLevelJsonBase.hpp
core/MultiLevelJsonBase.cpp
core/StelSkyImageTile.hpp
core/StelSkyImageTile.cpp
core/StelSkyPolygon.hpp
core/StelSkyPolygon.cpp
core/SphericMirrorCalculator.cpp
core/SphericMirrorCalculator.hpp
core/StelApp.cpp
core/StelApp.hpp
core/StelCore.cpp
core/StelCore.hpp
core/StelFileMgr.cpp
core/StelFileMgr.hpp
core/StelLocaleMgr.cpp
core/StelLocaleMgr.hpp
core/StelModule.cpp
core/StelModule.hpp
core/StelModuleMgr.cpp
core/StelModuleMgr.hpp
core/StelObject.cpp
core/StelObject.hpp
core/StelObjectMgr.cpp
core/StelObjectMgr.hpp
core/StelObjectModule.cpp
core/StelObjectModule.hpp
core/StelObjectType.hpp
core/StelOpenGL.cpp
core/StelOpenGL.hpp
core/StelPluginInterface.hpp
core/StelRegionObject.hpp
core/StelSkyCultureMgr.cpp
core/StelSkyCultureMgr.hpp
core/StelTextureMgr.cpp
core/StelTextureMgr.hpp
core/StelTexture.cpp
core/StelTexture.hpp
core/StelTextureTypes.hpp
core/StelToneReproducer.cpp
core/StelToneReproducer.hpp
core/StelSkyLayerMgr.cpp
core/StelSkyLayerMgr.hpp
core/StelSkyLayer.hpp
core/StelSkyLayer.cpp
core/StelFader.hpp
core/StelSphereGeometry.cpp
core/StelSphereGeometry.hpp
core/OctahedronPolygon.cpp
core/OctahedronPolygon.hpp
core/StelIniParser.cpp
core/StelIniParser.hpp
core/StelUtils.cpp
core/StelUtils.hpp
core/StelTranslator.cpp
core/StelTranslator.hpp
core/VecMath.hpp
core/StelJsonParser.hpp
core/StelJsonParser.cpp
core/SimbadSearcher.hpp
core/SimbadSearcher.cpp
core/StelSphericalIndex.hpp
core/StelSphericalIndex.cpp
core/StelVertexArray.hpp
core/StelVertexArray.cpp
core/StelGuiBase.hpp
core/StelGuiBase.cpp
core/StelViewportEffect.hpp
core/StelViewportEffect.cpp
core/TrailGroup.hpp
core/TrailGroup.cpp
core/RefractionExtinction.hpp
core/RefractionExtinction.cpp
core/StelToast.hpp
core/StelToast.cpp
core/StelToastGrid.hpp
core/StelToastGrid.cpp
core/StelActionMgr.hpp
core/StelActionMgr.cpp
core/StelProgressController.hpp
core/StelPropertyMgr.hpp
core/StelPropertyMgr.cpp
core/StelOBJ.hpp
core/StelOBJ.cpp
core/GeomMath.hpp
core/GeomMath.cpp
core/StelOpenGLArray.hpp
core/StelOpenGLArray.cpp
core/StelHips.hpp
core/StelHips.cpp
${spout_SRCS}
core/planetsephems/calc_interpolated_elements.c
core/planetsephems/calc_interpolated_elements.h
core/planetsephems/elliptic_to_rectangular.c
core/planetsephems/elliptic_to_rectangular.h
core/planetsephems/elp82b.c
core/planetsephems/elp82b.h
core/planetsephems/gust86.c
core/planetsephems/gust86.h
core/planetsephems/l1.c
core/planetsephems/l1.h
core/planetsephems/marssat.c
core/planetsephems/marssat.h
core/planetsephems/pluto.c
core/planetsephems/pluto.h
core/planetsephems/precession.c
core/planetsephems/precession.h
core/planetsephems/sidereal_time.c
core/planetsephems/sidereal_time.h
#core/planetsephems/stellplanet.c # replaced by EphemWrapper during de430 work
#core/planetsephems/stellplanet.h
core/planetsephems/jpl_int.h
core/planetsephems/jpleph.h
core/planetsephems/jpleph.cpp
core/planetsephems/EphemWrapper.cpp
core/planetsephems/EphemWrapper.hpp
core/planetsephems/tass17.c
core/planetsephems/tass17.h
core/planetsephems/vsop87.c
core/planetsephems/vsop87.h
core/planetsephems/de430.cpp
core/planetsephems/de430.hpp
core/planetsephems/de431.cpp
core/planetsephems/de431.hpp
core/modules/Atmosphere.cpp
core/modules/Atmosphere.hpp
core/modules/Asterism.cpp
core/modules/Asterism.hpp
core/modules/AsterismMgr.cpp
core/modules/AsterismMgr.hpp
core/modules/Constellation.cpp
core/modules/Constellation.hpp
core/modules/ConstellationMgr.cpp
core/modules/ConstellationMgr.hpp
core/modules/CustomObject.cpp
core/modules/CustomObject.hpp
core/modules/CustomObjectMgr.cpp
core/modules/CustomObjectMgr.hpp
core/modules/GridLinesMgr.cpp
core/modules/GridLinesMgr.hpp
core/modules/HipsMgr.hpp
core/modules/HipsMgr.cpp
core/modules/LabelMgr.hpp
core/modules/LabelMgr.cpp
core/modules/Landscape.cpp
core/modules/Landscape.hpp
core/modules/LandscapeMgr.cpp
core/modules/LandscapeMgr.hpp
core/modules/Meteor.cpp
core/modules/Meteor.hpp
core/modules/SporadicMeteor.cpp
core/modules/SporadicMeteor.hpp
core/modules/SporadicMeteorMgr.cpp
core/modules/SporadicMeteorMgr.hpp
core/modules/MilkyWay.cpp
core/modules/MilkyWay.hpp
core/modules/Nebula.cpp
core/modules/Nebula.hpp
core/modules/NebulaMgr.cpp
core/modules/NebulaMgr.hpp
core/modules/Orbit.cpp
core/modules/Orbit.hpp
core/modules/Planet.cpp
core/modules/Planet.hpp
core/modules/MinorPlanet.cpp
core/modules/MinorPlanet.hpp
core/modules/Comet.cpp
core/modules/Comet.hpp
core/modules/Skybright.cpp
core/modules/Skybright.hpp
core/modules/Skylight.cpp
core/modules/Skylight.hpp
core/modules/SolarSystem.cpp
core/modules/SolarSystem.hpp
core/modules/NomenclatureItem.cpp
core/modules/NomenclatureItem.hpp
core/modules/NomenclatureMgr.cpp
core/modules/NomenclatureMgr.hpp
core/modules/Solve.hpp
core/modules/Star.cpp
core/modules/Star.hpp
core/modules/StarMgr.cpp
core/modules/StarMgr.hpp
core/modules/StarWrapper.cpp
core/modules/StarWrapper.hpp
core/modules/ToastMgr.hpp
core/modules/ToastMgr.cpp
core/modules/ZoneArray.cpp
core/modules/ZodiacalLight.hpp
core/modules/ZodiacalLight.cpp
core/modules/ZoneArray.hpp
core/modules/ZoneData.hpp
StelMainView.hpp
StelMainView.cpp
StelLogger.hpp
StelLogger.cpp
CLIProcessor.hpp
CLIProcessor.cpp
translations.h
translations_countries.h
)
### CMake < 3.0 does not AUTOMOC Q_GADGET which some files use, so we have to manually add it
### Wrap it in an IF to prevent some linker warnings about symbols defined twice (on MSVC13 at least)
### Q_GADGET is required force the Qt MOC to run on some specific files,
### because they do not contain QObjects, but require a MOC for Q_FLAGS or similar
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0)
QT5_WRAP_CPP(stellarium_lib_moc_SRCS
core/StelObject.hpp
core/StelRegionObject.hpp
core/modules/Nebula.hpp
)
SET(stellarium_lib_SRCS ${stellarium_lib_SRCS}
${stellarium_lib_moc_SRCS}
)
ENDIF()
IF(ENABLE_SCRIPTING)
SET(stellarium_lib_SRCS ${stellarium_lib_SRCS}
scripting/StelScriptOutput.hpp
scripting/StelScriptOutput.cpp
scripting/StelScriptMgr.cpp
scripting/StelScriptMgr.hpp
scripting/ScreenImageMgr.hpp
scripting/ScreenImageMgr.cpp
scripting/StelMainScriptAPI.cpp
scripting/StelMainScriptAPI.hpp
scripting/StelMainScriptAPIProxy.cpp
scripting/StelMainScriptAPIProxy.hpp
)
ENDIF()
SET(stellarium_exe_SRCS main.cpp)
################# compiles resources files ############
SET(stellarium_RES ${CMAKE_SOURCE_DIR}/data/mainRes.qrc)
QT5_ADD_RESOURCES(stellarium_RES_CXX ${stellarium_RES})
#############################################################################################
############################# Standard GUI plugin compilation ###############################
#############################################################################################
IF(STELLARIUM_GUI_MODE STREQUAL "Standard")
SET(stellarium_gui_SRCS
gui/StelGui.hpp
gui/StelGui.cpp
gui/SkyGui.hpp
gui/SkyGui.cpp
gui/StelStyle.hpp
gui/StelGuiItems.hpp
gui/StelGuiItems.cpp
gui/HelpDialog.hpp
gui/HelpDialog.cpp
gui/ShortcutLineEdit.hpp
gui/ShortcutLineEdit.cpp
gui/ShortcutsDialog.hpp
gui/ShortcutsDialog.cpp
gui/Dialog.hpp
gui/Dialog.cpp
gui/MapLabel.hpp
gui/MapLabel.cpp
gui/AngleSpinBox.hpp
gui/AngleSpinBox.cpp
gui/LocationDialog.hpp
gui/LocationDialog.cpp
gui/DateTimeDialog.hpp
gui/DateTimeDialog.cpp
gui/ViewDialog.hpp
gui/ViewDialog.cpp
gui/SearchDialog.hpp
gui/SearchDialog.cpp
gui/ConfigurationDialog.hpp
gui/ConfigurationDialog.cpp
gui/AddRemoveLandscapesDialog.hpp
gui/AddRemoveLandscapesDialog.cpp
gui/AtmosphereDialog.hpp
gui/AtmosphereDialog.cpp
gui/ConfigureDSOColorsDialog.hpp
gui/ConfigureDSOColorsDialog.cpp
gui/ConfigureOrbitColorsDialog.hpp
gui/ConfigureOrbitColorsDialog.cpp
gui/GreatRedSpotDialog.hpp
gui/GreatRedSpotDialog.cpp
gui/CustomDeltaTEquationDialog.hpp
gui/CustomDeltaTEquationDialog.cpp
gui/AstroCalcDialog.hpp
gui/AstroCalcDialog.cpp
gui/BookmarksDialog.hpp
gui/BookmarksDialog.cpp
gui/StelDialog.hpp
gui/StelDialog_p.hpp
gui/StelDialog.cpp
)
################# compiles .ui files ############
SET(stellarium_UIS
gui/locationDialogGui.ui
gui/helpDialogGui.ui
gui/shortcutsDialog.ui
gui/dateTimeDialogGui.ui
gui/viewDialog.ui
gui/searchDialogGui.ui
gui/configurationDialog.ui
gui/atmosphereDialog.ui
gui/greatRedSpotDialog.ui
gui/customDeltaTEquationDialog.ui
gui/astroCalcDialog.ui
gui/bookmarksDialog.ui
gui/addRemoveLandscapesDialog.ui
gui/dsoColorsDialog.ui
gui/orbitColorsDialog.ui
)
IF(ENABLE_SCRIPTING)
IF(ENABLE_SCRIPT_CONSOLE)
SET(stellarium_gui_SRCS ${stellarium_gui_SRCS}
gui/ScriptConsole.hpp
gui/ScriptConsole.cpp
gui/StelScriptSyntaxHighlighter.hpp
gui/StelScriptSyntaxHighlighter.cpp
)
SET(stellarium_UIS ${stellarium_UIS}
gui/scriptConsole.ui
)
ENDIF()
ENDIF()
QT5_WRAP_UI(stellarium_UIS_H ${stellarium_UIS})
# compiles resources files
SET(stellarium_gui_RES ${CMAKE_SOURCE_DIR}/data/gui/guiRes.qrc)
QT5_ADD_RESOURCES(stellarium_gui_RES_CXX ${stellarium_gui_RES})
SET(stellarium_lib_SRCS ${stellarium_lib_SRCS} ${stellarium_gui_SRCS} ${stellarium_UIS_H} ${stellarium_gui_RES_CXX})
ENDIF()
#############################################################################################
################################ No GUI plugin compilation ##################################
#############################################################################################
IF (STELLARIUM_GUI_MODE STREQUAL "None")
ADD_DEFINITIONS(-DNO_GUI)
ENDIF()
###############################################################################################
################## Static plugins need to be known by the file StelApp.cpp at compilation time
################## so add the definitions to the compilation.
################## Also add the full path to the .a libraries at compilation time.
### demo plugins ###
FOREACH(NAME ${STELLARIUM_PLUGINS})
STRING(TOUPPER ${NAME} NAME_UP)
IF(USE_PLUGIN_${NAME_UP})
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} ${NAME}-static)
ADD_DEFINITIONS(-DUSE_STATIC_PLUGIN_${NAME_UP})
ENDIF()
ENDFOREACH()
IF(USE_PLUGIN_TELESCOPECONTROL)
# WinSock library
IF(WIN32)
SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} ws2_32)
ENDIF()
ENDIF()
#############################################################################################
################################ Build main program #########################################
#############################################################################################
IF(WIN32)
# This library is required for some native methods used in a fix in main.cpp
SET(winMMLib winmm)
ENDIF()
IF(WIN32 AND ENABLE_WINDOWS_EXE_ICON)
IF(RC_COMPILER_PATH)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_BINARY_DIR}/stellarium-rc.o
COMMAND ${RC_COMPILER_PATH} ${CMAKE_BINARY_DIR}/stellarium.rc ${CMAKE_BINARY_DIR}/stellarium-rc.o)
SET(stellarium_exe_SRCS ${stellarium_exe_SRCS} ${CMAKE_BINARY_DIR}/stellarium-rc.o)
ELSE()
IF(MSVC)
SET(stellarium_exe_SRCS ${stellarium_exe_SRCS} ${CMAKE_BINARY_DIR}/stellarium.rc)
ENDIF()
ENDIF()
ENDIF()
# Setup Qt5 dependencies
SET(STELLARIUM_QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Gui ${STEL_GLES_LIBS} Qt5::Network Qt5::Widgets)
IF(ENABLE_MEDIA)
SET(STELLARIUM_QT_LIBRARIES ${STELLARIUM_QT_LIBRARIES} Qt5::Multimedia Qt5::MultimediaWidgets)
ENDIF()
IF(ENABLE_SCRIPTING)
SET(STELLARIUM_QT_LIBRARIES ${STELLARIUM_QT_LIBRARIES} Qt5::Script)
ENDIF()
IF(USE_OLD_QGLWIDGET)
# The Qt5OpenGL library is only required when using the legacy viewport
SET(STELLARIUM_QT_LIBRARIES ${STELLARIUM_QT_LIBRARIES} Qt5::OpenGL)
ENDIF()
IF(ENABLE_GPS)
SET(STELLARIUM_QT_LIBRARIES ${STELLARIUM_QT_LIBRARIES} Qt5::Positioning Qt5::SerialPort)
ENDIF()
IF(ENABLE_SPOUT AND SPOUT_LIBRARY_DLL)
# automatically copy the spout .dll to the binary directory, if possible
CONFIGURE_FILE(${SPOUT_LIBRARY_DLL} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
ENDIF()
SET(STELMAIN_DEPS ${ZLIB_LIBRARIES} qtcompress_stel glues_stel qcustomplot_stel ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} ${STELLARIUM_QT_LIBRARIES} ${SPOUT_LIBRARY})
IF(ENABLE_LIBGPS)
SET(STELMAIN_DEPS ${STELMAIN_DEPS} ${GPS_LIBRARY})
ENDIF()
# Main executable/library setup
IF(GENERATE_STELMAINLIB)
ADD_LIBRARY(stelMain SHARED ${stellarium_lib_SRCS} ${stellarium_RES_CXX})
TARGET_LINK_LIBRARIES(stelMain ${STELMAIN_DEPS})
INSTALL(TARGETS stelMain DESTINATION lib)
# WIN32 creates a windows app without console, no effect on non-win platforms
ADD_EXECUTABLE(stellarium WIN32 ${stellarium_exe_SRCS})
#stelMain should be after the plug-ins, otherwise the build crashes
TARGET_LINK_LIBRARIES(stellarium stelMain ${winMMLib})
ELSE()
ADD_LIBRARY(stelMain ${stellarium_lib_SRCS} ${stellarium_RES_CXX})
TARGET_LINK_LIBRARIES(stelMain ${STELMAIN_DEPS})
ADD_EXECUTABLE(stellarium WIN32 ${stellarium_exe_SRCS})
TARGET_LINK_LIBRARIES(stellarium ${winMMLib} ${STELMAIN_DEPS} stelMain)
IF(APPLE)
SET_TARGET_PROPERTIES(stellarium PROPERTIES LINK_FLAGS " -framework Cocoa -framework OpenGL")
ENDIF()
ENDIF()
ADD_DEPENDENCIES(stellarium AllStaticPlugins)
# Adding manifest
IF(MSVC)
ADD_CUSTOM_COMMAND(TARGET stellarium
POST_BUILD
COMMAND "mt.exe" -nologo -manifest ${PROJECT_SOURCE_DIR}/data/stellarium.exe.manifest -outputresource:$<TARGET_FILE:stellarium>
COMMENT "Adding manifest..."
VERBATIM
)
ENDIF(MSVC)
INSTALL(TARGETS stellarium DESTINATION bin)
IF(WIN32)
# ADD_CUSTOM_COMMAND(TARGET stellarium
# POST_BUILD
# COMMAND "${WINDEPLOYQT_COMMAND}" --dir ${CMAKE_INSTALL_PREFIX}/qt5stuff --no-translations --compiler-runtime $<TARGET_FILE:stellarium>
# COMMENT "Running windeployqt..."
# VERBATIM
# )
INSTALL(CODE
"
EXECUTE_PROCESS(
COMMAND \"${WINDEPLOYQT_COMMAND}\"
--dir \"\${CMAKE_INSTALL_PREFIX}/qt5stuff\"
--no-translations
--compiler-runtime
\"\${CMAKE_INSTALL_PREFIX}/bin/stellarium.exe\"
WORKING_DIRECTORY \"\${CMAKE_INSTALL_PRERIX}/bin\"
OUTPUT_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/windeployqt.log\"
ERROR_FILE \"\${CMAKE_CURRENT_BINARY_DIR}/windeployqt.err\"
)
"
)
ENDIF()
SET_TARGET_PROPERTIES(stelMain PROPERTIES FOLDER "src/core")
SET_TARGET_PROPERTIES(stellarium PROPERTIES FOLDER "src")
#############################################################################################
################################## Build unit tests #########################################
#############################################################################################
IF(ENABLE_TESTING)
SET(TESTS_LIBRARIES ${ZLIB_LIBRARIES} Qt5::Core Qt5::Gui Qt5::Test stelMain)
# Custom target used to build all tests at once
ADD_CUSTOM_TARGET(buildTests)
SET_TARGET_PROPERTIES(buildTests PROPERTIES FOLDER "src/tests")
SET(tests_testDates_SRCS
tests/testDates.hpp
tests/testDates.cpp
)
ADD_EXECUTABLE(testDates ${tests_testDates_SRCS})
TARGET_LINK_LIBRARIES(testDates ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testDates)
ADD_TEST(testDates testDates)
SET_TARGET_PROPERTIES(testDates PROPERTIES FOLDER "src/tests")
SET(tests_testStelFileMgr_SRCS
tests/testStelFileMgr.hpp
tests/testStelFileMgr.cpp
)
ADD_EXECUTABLE(testStelFileMgr ${tests_testStelFileMgr_SRCS})
TARGET_LINK_LIBRARIES(testStelFileMgr ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelFileMgr)
ADD_TEST(testStelFileMgr testStelFileMgr)
SET_TARGET_PROPERTIES(testStelFileMgr PROPERTIES FOLDER "src/tests")
SET(tests_testStelSphereGeometry_SRCS
tests/testStelSphereGeometry.hpp
tests/testStelSphereGeometry.cpp
)
ADD_EXECUTABLE(testStelSphereGeometry ${tests_testStelSphereGeometry_SRCS})
TARGET_LINK_LIBRARIES(testStelSphereGeometry ${TESTS_LIBRARIES} glues_stel)
ADD_DEPENDENCIES(buildTests testStelSphereGeometry)
ADD_TEST(testStelSphereGeometry testStelSphereGeometry)
SET_TARGET_PROPERTIES(testStelSphereGeometry PROPERTIES FOLDER "src/tests")
SET(tests_testStelSphericalIndex_SRCS
tests/testStelSphericalIndex.hpp
tests/testStelSphericalIndex.cpp
)
ADD_EXECUTABLE(testStelSphericalIndex ${tests_testStelSphericalIndex_SRCS})
TARGET_LINK_LIBRARIES(testStelSphericalIndex ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelSphericalIndex)
ADD_TEST(testStelSphericalIndex testStelSphericalIndex)
SET_TARGET_PROPERTIES(testStelSphericalIndex PROPERTIES FOLDER "src/tests")
SET(tests_testStelJsonParser_SRCS
tests/testStelJsonParser.hpp
tests/testStelJsonParser.cpp
)
ADD_EXECUTABLE(testStelJsonParser ${tests_testStelJsonParser_SRCS})
TARGET_LINK_LIBRARIES(testStelJsonParser ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelJsonParser)
ADD_TEST(testStelJsonParser testStelJsonParser)
SET_TARGET_PROPERTIES(testStelJsonParser PROPERTIES FOLDER "src/tests")
SET(tests_testStelVertexArray_SRCS
tests/testStelVertexArray.hpp
tests/testStelVertexArray.cpp
)
ADD_EXECUTABLE(testStelVertexArray ${tests_testStelVertexArray_SRCS})
TARGET_LINK_LIBRARIES(testStelVertexArray ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelVertexArray)
ADD_TEST(testStelVertexArray testStelVertexArray)
SET_TARGET_PROPERTIES(testStelVertexArray PROPERTIES FOLDER "src/tests")
SET(tests_testDeltaT_SRCS
tests/testDeltaT.hpp
tests/testDeltaT.cpp
)
ADD_EXECUTABLE(testDeltaT ${tests_testDeltaT_SRCS})
TARGET_LINK_LIBRARIES(testDeltaT ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testDeltaT)
ADD_TEST(testDeltaT testDeltaT)
SET_TARGET_PROPERTIES(testDeltaT PROPERTIES FOLDER "src/tests")
SET(tests_testConversions_SRCS
tests/testConversions.hpp
tests/testConversions.cpp
)
ADD_EXECUTABLE(testConversions ${tests_testConversions_SRCS})
TARGET_LINK_LIBRARIES(testConversions ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testConversions)
ADD_TEST(testConversions testConversions)
SET_TARGET_PROPERTIES(testConversions PROPERTIES FOLDER "src/tests")
SET(tests_testExtinction_SRCS
tests/testExtinction.hpp
tests/testExtinction.cpp
)
ADD_EXECUTABLE(testExtinction ${tests_testExtinction_SRCS})
TARGET_LINK_LIBRARIES(testExtinction ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testExtinction)
ADD_TEST(testExtinction testExtinction)
SET_TARGET_PROPERTIES(testExtinction PROPERTIES FOLDER "src/tests")
SET(tests_testRefraction_SRCS
tests/testRefraction.hpp
tests/testRefraction.cpp
)
ADD_EXECUTABLE(testRefraction ${tests_testRefraction_SRCS})
TARGET_LINK_LIBRARIES(testRefraction ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testRefraction)
ADD_TEST(testRefraction testRefraction)
SET_TARGET_PROPERTIES(testRefraction PROPERTIES FOLDER "src/tests")
SET(tests_testPrecession_SRCS
tests/testPrecession.hpp
tests/testPrecession.cpp
)
ADD_EXECUTABLE(testPrecession ${tests_testPrecession_SRCS})
TARGET_LINK_LIBRARIES(testPrecession ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testPrecession)
ADD_TEST(testPrecession testPrecession)
SET_TARGET_PROPERTIES(testPrecession PROPERTIES FOLDER "src/tests")
SET(tests_testEphemeris_SRCS
tests/testEphemeris.hpp
tests/testEphemeris.cpp
)
ADD_EXECUTABLE(testEphemeris ${tests_testEphemeris_SRCS})
TARGET_LINK_LIBRARIES(testEphemeris ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testEphemeris)
ADD_TEST(testEphemeris testEphemeris)
SET_TARGET_PROPERTIES(testEphemeris PROPERTIES FOLDER "src/tests")
ENDIF (ENABLE_TESTING)