CMakeLists.txt 35.2 KB
Newer Older
1
add_subdirectory( data )
2
add_subdirectory( icons )
3
add_subdirectory( htmesh )
4
5

if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
6
    SET(HAVE_KF5WIT 1)
7
8
9
    if(NOT BUILD_KSTARS_LITE)
        add_subdirectory( tools/whatsinteresting/qml)
    endif(NOT BUILD_KSTARS_LITE)
10
else()
11
    SET(HAVE_KF5WIT 0)
12
endif()
13

14
15
16
17
18
19
20
21
if (ANDROID AND CMAKE_TOOLCHAIN_FILE)
    include(${CMAKE_TOOLCHAIN_FILE})
endif ()

if (NOT ANDROID)
    Find_package(ZLIB REQUIRED)
    Find_package(Threads REQUIRED)
endif ()
22

23
24
25
26
27
if(MSVC)
    add_definitions(-D_USE_MATH_DEFINES=1)
    add_definitions(-DNOMINMAX)
endif()

28
include_directories(
Csaba Kertesz's avatar
Csaba Kertesz committed
29
    ${kstars_SOURCE_DIR}/kstars
30
31
32
33
34
    ${kstars_SOURCE_DIR}/kstars/skyobjects
    ${kstars_SOURCE_DIR}/kstars/skycomponents
    ${kstars_SOURCE_DIR}/kstars/auxiliary
    ${kstars_SOURCE_DIR}/kstars/time
)
35
36

if(BUILD_KSTARS_LITE)
37
    include_directories(
38
        ${kstars_SOURCE_DIR}/kstars/triangle
Akarsh Simha's avatar
Akarsh Simha committed
39
    )
40
41
42
else(BUILD_KSTARS_LITE)
    include_directories(
        ${kstars_SOURCE_DIR}/kstars/tools
Akarsh Simha's avatar
Akarsh Simha committed
43
    )
44
endif(BUILD_KSTARS_LITE)
45

46
if(NOT BUILD_KSTARS_LITE)
47
    if (CFITSIO_FOUND)
48
49
50
51
        set (fits_SRCS
            fitsviewer/fitshistogram.cpp
            fitsviewer/fitsdata.cpp
            fitsviewer/fitsview.cpp
52
            fitsviewer/fitslabel.cpp
53
54
55
            fitsviewer/fitsviewer.cpp
            fitsviewer/fitstab.cpp
            fitsviewer/fitsdebayer.cpp
56
            fitsviewer/opsfits.cpp
57
            )
Csaba Kertesz's avatar
Csaba Kertesz committed
58
59
60
        set (fits_bayer_SRCS
            fitsviewer/bayer.c
            )
61
62
63
64
65
        set (fitsui_SRCS
            fitsviewer/fitsheaderdialog.ui
            fitsviewer/statform.ui
            fitsviewer/fitsdebayer.ui
            indi/streamform.ui
66
            indi/recordingoptions.ui
67
            fitsviewer/fitshistogramui.ui
68
            fitsviewer/opsfits.ui
69
            )
Artem Fedoskin's avatar
Artem Fedoskin committed
70
        include_directories(${CFITSIO_INCLUDE_DIR})
71
72
73
74

        IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
            SET_SOURCE_FILES_PROPERTIES(fitsviewer/bayer.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align")
        ENDIF ()
75
    endif(CFITSIO_FOUND)
76
endif(NOT BUILD_KSTARS_LITE)
77

78
if (INDI_FOUND)
79
80
    if(BUILD_KSTARS_LITE)
            set (fits_SRCS
Jasem Mutlaq's avatar
Jasem Mutlaq committed
81
                fitsviewer/fitsdata.cpp
Csaba Kertesz's avatar
Csaba Kertesz committed
82
83
                )
            set (fits_bayer_SRCS
84
85
86
                fitsviewer/bayer.c
                )
                include_directories(${CFITSIO_INCLUDE_DIR})
87
                include_directories(${NOVA_INCLUDE_DIR})
88
89
90
91
92
93

            set (indi_SRCS
                indi/clientmanagerlite.cpp
                indi/inditelescopelite.cpp
                kstarslite/skyitems/skynodes/crosshairnode.cpp
                kstarslite/skyitems/telescopesymbolsitem.cpp
94
            )
95
96
97
98
99
100
101
102
103
    else(BUILD_KSTARS_LITE)
            set(indiui_SRCS
                indi/streamform.ui
                indi/drivermanager.ui
                indi/opsindi.ui
                indi/indihostconf.ui
                indi/telescopewizard.ui
            )

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
            set(indi_SRCS
                indi/drivermanager.cpp
                indi/servermanager.cpp
                indi/clientmanager.cpp
                indi/guimanager.cpp
                indi/driverinfo.cpp
                indi/deviceinfo.cpp
                indi/indidevice.cpp
                indi/indigroup.cpp
                indi/indiproperty.cpp
                indi/indielement.cpp
                indi/indistd.cpp
                indi/indilistener.cpp
                indi/inditelescope.cpp
                indi/indiccd.cpp
                indi/indifocuser.cpp
                indi/indifilter.cpp
                indi/indidome.cpp
                indi/indiweather.cpp
                indi/indicap.cpp
                indi/indilightbox.cpp
                indi/indidbus.cpp
                indi/opsindi.cpp
                indi/telescopewizardprocess.cpp
                indi/streamwg.cpp
129
                indi/videowg.cpp
130
                indi/indiwebmanager.cpp
131
            )
132

133
134
135
136
137
            if (CFITSIO_FOUND)
                set(ekosui_SRCS
                    ekos/opsekos.ui
                    ekos/ekosmanager.ui
                    ekos/profileeditor.ui
138
                    ekos/profilewizard.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
139
140
141
142
143
144
                    # Scheduler
                    ekos/scheduler/scheduler.ui
                    ekos/scheduler/mosaic.ui
                    # Capture
                    ekos/capture/capture.ui
                    ekos/capture/calibrationoptions.ui
145
                    ekos/capture/dslrinfo.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
146
                    ekos/capture/rotatorsettings.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
147
148
                    # Align
                    ekos/align/align.ui
149
150
151
                    ekos/align/opsekos.ui
                    ekos/align/opsastrometry.ui
                    ekos/align/opsalign.ui
152
153
                    ekos/align/opsastrometrycfg.ui
                    ekos/align/opsastrometryindexfiles.ui
154
                    ekos/align/mountmodel.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
155
156
157
                    # Focus
                    ekos/focus/focus.ui
                    # Mount
158
                    ekos/mount/mount.ui                    
Jasem Mutlaq's avatar
Jasem Mutlaq committed
159
160
                    # Guide
                    ekos/guide/guide.ui
161
                    ekos/guide/opscalibration.ui
162
                    ekos/guide/opsguide.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
163
164
165
                    #TODO remove from GIT
                    #ekos/guide/guider.ui
                    #ekos/guide/rcalibration.ui
166
167
                )

168
169
170
171
            set(ekos_SRCS
                       ekos/ekos.cpp
                       ekos/ekosmanager.cpp
                       ekos/profileeditor.cpp
172
173
                       ekos/profilewizard.cpp
                       ekos/opsekos.cpp                       
Jasem Mutlaq's avatar
Jasem Mutlaq committed
174
175
176
177
178
179
180
181
182
183

                       # Auxiliary
                       ekos/auxiliary/dome.cpp
                       ekos/auxiliary/weather.cpp
                       ekos/auxiliary/dustcap.cpp
                       ekos/auxiliary/darklibrary.cpp

                       # Capture
                       ekos/capture/capture.cpp
                       ekos/capture/sequencejob.cpp
184
                       ekos/capture/dslrinfodialog.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
185
                       ekos/capture/rotatorsettings.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
186
187
188
189
190
191
192
193
194
195
196
197
198
199

                       # Scheduler
                       ekos/scheduler/schedulerjob.cpp
                       ekos/scheduler/scheduler.cpp
                       ekos/scheduler/mosaic.cpp

                       # Focus
                       ekos/focus/focus.cpp

                       # Mount
                       ekos/mount/mount.cpp

                       # Align
                       ekos/align/align.cpp
200
                       ekos/align/alignview.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
201
                       ekos/align/astrometryparser.cpp
202
203
                       ekos/align/opsastrometry.cpp
                       ekos/align/opsalign.cpp
204
205
                       ekos/align/opsastrometrycfg.cpp
                       ekos/align/opsastrometryindexfiles.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
206
207
208
209
210
211
                       ekos/align/offlineastrometryparser.cpp
                       ekos/align/onlineastrometryparser.cpp
                       ekos/align/remoteastrometryparser.cpp

                       # Guide
                       ekos/guide/guide.cpp
212
                       ekos/guide/guideinterface.cpp                       
213
                       ekos/guide/opscalibration.cpp
214
                       ekos/guide/opsguide.cpp
215
                       # Internal Guide                       
Jasem Mutlaq's avatar
Jasem Mutlaq committed
216
217
                       ekos/guide/internalguide/gmath.cpp
                       ekos/guide/internalguide/internalguider.cpp
218
                       #ekos/guide/internalguide/guider.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
219
                       ekos/guide/internalguide/matr.cpp
220
                       #ekos/guide/internalguide/rcalibration.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
221
                       ekos/guide/internalguide/vect.cpp
222
                       ekos/guide/internalguide/imageautoguiding.cpp
223
                       # External Guide
224
                       ekos/guide/externalguide/phd2.cpp
225
                       ekos/guide/externalguide/linguider.cpp
226
           )
227
228
            endif(CFITSIO_FOUND)
    endif(BUILD_KSTARS_LITE)
229

230
    include_directories(${INDI_INCLUDE_DIR})
231
endif (INDI_FOUND)
232

233
if(NOT BUILD_KSTARS_LITE)
234
235
236
    if(WCSLIB_FOUND)
      include_directories( ${WCSLIB_INCLUDE_DIR} )
    endif(WCSLIB_FOUND)
237

238
239
    if(XPLANET_FOUND)
        set(xplanet_SRCS
240
            xplanet/opsxplanet.cpp
241
        )
242

243
244
        set(xplanetui_SRCS
            xplanet/opsxplanet.ui
245
246
        )
    endif(XPLANET_FOUND)
247
248
249

    ########### next target ###############
    set(libkstarstools_SRCS
250
251
252
253
        tools/altvstime.cpp
        tools/avtplotwidget.cpp
        tools/calendarwidget.cpp
        tools/conjunctions.cpp
Akarsh Simha's avatar
Akarsh Simha committed
254
#        tools/jmoontool.cpp
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
        tools/ksconjunct.cpp
        tools/eqplotwidget.cpp
        tools/astrocalc.cpp
        tools/modcalcangdist.cpp
        tools/modcalcapcoord.cpp
        tools/modcalcaltaz.cpp
        tools/modcalcdaylength.cpp
        tools/modcalceclipticcoords.cpp
        tools/modcalcvizequinox.cpp
        tools/modcalcgalcoord.cpp
        tools/modcalcgeodcoord.cpp
        tools/modcalcjd.cpp
        tools/modcalcplanets.cpp
        tools/modcalcsidtime.cpp
        tools/modcalcvlsr.cpp
        tools/observinglist.cpp
        tools/obslistpopupmenu.cpp
        tools/sessionsortfilterproxymodel.cpp
        tools/obslistwizard.cpp
        tools/planetviewer.cpp
        tools/pvplotwidget.cpp
        tools/scriptargwidgets.cpp
        tools/scriptbuilder.cpp
        tools/scriptfunction.cpp
        tools/skycalendar.cpp
        tools/wutdialog.cpp
        tools/flagmanager.cpp
        tools/horizonmanager.cpp
283
        tools/nameresolver.cpp
284
285
286
287
288
289
290
291

        #FIXME Port to KF5
        #tools/moonphasetool.cpp

        tools/starhopper.cpp
        tools/eyepiecefield.cpp
        tools/exporteyepieceview.cpp
        tools/starhopperdialog.cpp
292
        tools/adddeepskyobject.cpp
293
    )
294

295
296
297
    if(${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
        set(libkstarstools_SRCS
            ${libkstarstools_SRCS}
298
299
300
301
302
303
304
305
            tools/whatsinteresting/skyobjlistmodel.cpp
            tools/whatsinteresting/wiview.cpp
            tools/whatsinteresting/modelmanager.cpp
            tools/whatsinteresting/skyobjitem.cpp
            tools/whatsinteresting/wilpsettings.cpp
            tools/whatsinteresting/wiequipsettings.cpp
            tools/whatsinteresting/obsconditions.cpp
            tools/whatsinteresting/skyobjdescription.cpp
306
        )
307
308
309
    endif()

    ki18n_wrap_ui(libkstarstools_SRCS
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
        tools/altvstime.ui
        tools/argchangeviewoption.ui
        tools/argexportimage.ui
        tools/argloadcolorscheme.ui
        tools/arglooktoward.ui
        tools/argfindobject.ui
        tools/argprintimage.ui
        tools/argsetaltaz.ui
        tools/argsetcolor.ui
        tools/argsetgeolocation.ui
        tools/argsetlocaltime.ui
        tools/argsetradec.ui
        tools/argsettrack.ui
        tools/argtimescale.ui
        tools/argwaitfor.ui
        tools/argwaitforkey.ui
        tools/argzoom.ui
        tools/conjunctions.ui
328

329
330
331
332
333
334
335
336
337
338
339
340
        tools/modcalcangdist.ui
        tools/modcalcapcoord.ui
        tools/modcalcaltaz.ui
        tools/modcalcdaylength.ui
        tools/modcalceclipticcoords.ui
        tools/modcalcvizequinox.ui
        tools/modcalcgalcoord.ui
        tools/modcalcgeod.ui
        tools/modcalcjd.ui
        tools/modcalcplanets.ui
        tools/modcalcsidtime.ui
        tools/modcalcvlsr.ui
341

342
343
344
345
346
347
348
349
350
351
352
        tools/observinglist.ui
        tools/obslistwizard.ui
        tools/optionstreeview.ui
        tools/planetviewer.ui
        tools/scriptbuilder.ui
        tools/scriptnamedialog.ui
        tools/skycalendar.ui
        tools/wutdialog.ui
        tools/flagmanager.ui
        tools/starhopperdialog.ui
        tools/horizonmanager.ui
353
354
        tools/adddeepskyobject.ui
    )
355
356

    if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
357
        ki18n_wrap_ui(libkstarstools_SRCS
358
359
            tools/whatsinteresting/wilpsettings.ui
            tools/whatsinteresting/wiequipsettings.ui
360
        )
361
362
363
    endif()

    set(libkstarswidgets_SRCS
364
365
366
367
368
369
370
371
372
373
374
375
        widgets/clicklabel.cpp
        widgets/dmsbox.cpp
        widgets/draglistbox.cpp
        widgets/fovwidget.cpp
        widgets/logedit.cpp
        widgets/magnitudespinbox.cpp
        widgets/mapcanvas.cpp
        widgets/thumbimage.cpp
        widgets/timespinbox.cpp
        widgets/timestepbox.cpp
        widgets/timeunitbox.cpp
        widgets/infoboxwidget.cpp
376
377
    #    widgets/genericcalendarwidget.cpp
    #    widgets/moonphasecalendarwidget.cpp
378
        widgets/kshelplabel.cpp
379
        widgets/unitspinboxwidget.cpp
380
    )
Jasem Mutlaq's avatar
Jasem Mutlaq committed
381

382
    ki18n_wrap_ui(libkstarswidgets_SRCS
383
    #    widgets/genericcalendarwidget.ui
384
        widgets/unitspinboxwidget.ui
385
    )
386

387
    set(kstars_KCFG_SRCS Options.kcfgc)
388

389
    set(kstars_options_SRCS
390
391
392
393
394
395
396
        options/opsadvanced.cpp
        options/opscatalog.cpp
        options/opscolors.cpp
        options/opsguides.cpp
        options/opssolarsystem.cpp
        options/opssatellites.cpp
        options/opssupernovae.cpp
397
398
    )

399
    set(kstars_optionsui_SRCS
400
401
402
403
404
405
406
        options/opsadvanced.ui
        options/opscatalog.ui
        options/opscolors.ui
        options/opsguides.ui
        options/opssolarsystem.ui
        options/opssatellites.ui
        options/opssupernovae.ui
407
    )
408

409
    set(kstars_dialogs_SRCS
410
411
412
413
414
415
416
417
418
        dialogs/addcatdialog.cpp
        dialogs/addlinkdialog.cpp
        dialogs/detaildialog.cpp
        dialogs/finddialog.cpp
        dialogs/focusdialog.cpp
        dialogs/fovdialog.cpp
        dialogs/locationdialog.cpp
        dialogs/timedialog.cpp
        dialogs/exportimagedialog.cpp
419
    )
420

421
    set(kstars_dialogsui_SRCS
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
        dialogs/addcatdialog.ui
        dialogs/addlinkdialog.ui
        dialogs/details_database.ui
        dialogs/details_data.ui
        dialogs/details_data_comet.ui
        dialogs/details_links.ui
        dialogs/details_log.ui
        dialogs/details_position.ui
        dialogs/finddialog.ui
        dialogs/focusdialog.ui
        dialogs/fovdialog.ui
        dialogs/locationdialog.ui
        dialogs/wizwelcome.ui
        dialogs/wizlocation.ui
        dialogs/wizdownload.ui
Robert Lancaster's avatar
Robert Lancaster committed
437
438
        dialogs/wizdata.ui
        dialogs/wizastrometry.ui
439
440
        dialogs/newfov.ui
        dialogs/exportimagedialog.ui
441
    )
442

443
444
445
446
447
448
449
450
451
452
453
454
455
    set(oal_SRCS
        oal/log.cpp
        oal/observer.cpp
        oal/site.cpp
        oal/session.cpp
        oal/scope.cpp
        oal/eyepiece.cpp
        oal/filter.cpp
        oal/observation.cpp
        oal/lens.cpp
        oal/equipmentwriter.cpp
        oal/observeradd.cpp
        oal/execute.cpp
456
457
    )

458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
    set(printing_SRCS
        printing/detailstable.cpp
        printing/finderchart.cpp
        printing/foveditordialog.cpp
        printing/fovsnapshot.cpp
        printing/kstarsdocument.cpp
        printing/legend.cpp
        printing/loggingform.cpp
        printing/printingwizard.cpp
        printing/pwizchartconfig.cpp
        printing/pwizchartcontents.cpp
        printing/pwizfovbrowse.cpp
        printing/pwizfovconfig.cpp
        printing/pwizfovmanual.cpp
        printing/pwizfovsh.cpp
        printing/pwizfovtypeselection.cpp
        printing/pwizobjectselection.cpp
        printing/pwizprint.cpp
        printing/shfovexporter.cpp
        printing/simplefovexporter.cpp
    )
479

480
481
482
483
484
485
486
487
488
489
490
491
    set(printingui_SRCS
        printing/foveditordialog.ui
        printing/pwizchartconfig.ui
        printing/pwizchartcontents.ui
        printing/pwizfovbrowse.ui
        printing/pwizfovconfig.ui
        printing/pwizfovmanual.ui
        printing/pwizfovsh.ui
        printing/pwizfovtypeselection.ui
        printing/pwizobjectselection.ui
        printing/pwizprint.ui
        printing/pwizwelcome.ui
492
    )
493

494
495
496
497
498
499
500
501
502
503
504
505
506
    set(oal_SRCS
        oal/log.cpp
        oal/observer.cpp
        oal/site.cpp
        oal/session.cpp
        oal/scope.cpp
        oal/eyepiece.cpp
        oal/filter.cpp
        oal/observation.cpp
        oal/lens.cpp
        oal/equipmentwriter.cpp
        oal/observeradd.cpp
        oal/execute.cpp
507
        )
508

509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
    set(printing_SRCS
        printing/detailstable.cpp
        printing/finderchart.cpp
        printing/foveditordialog.cpp
        printing/fovsnapshot.cpp
        printing/kstarsdocument.cpp
        printing/legend.cpp
        printing/loggingform.cpp
        printing/printingwizard.cpp
        printing/pwizchartconfig.cpp
        printing/pwizchartcontents.cpp
        printing/pwizfovbrowse.cpp
        printing/pwizfovconfig.cpp
        printing/pwizfovmanual.cpp
        printing/pwizfovsh.cpp
        printing/pwizfovtypeselection.cpp
        printing/pwizobjectselection.cpp
        printing/pwizprint.cpp
        printing/shfovexporter.cpp
        printing/simplefovexporter.cpp
529
        )
530

531
532
533
534
535
536
537
538
539
540
541
542
    set(printingui_SRCS
        printing/foveditordialog.ui
        printing/pwizchartconfig.ui
        printing/pwizchartcontents.ui
        printing/pwizfovbrowse.ui
        printing/pwizfovconfig.ui
        printing/pwizfovmanual.ui
        printing/pwizfovsh.ui
        printing/pwizfovtypeselection.ui
        printing/pwizobjectselection.ui
        printing/pwizprint.ui
        printing/pwizwelcome.ui
543
        )
544
endif(NOT BUILD_KSTARS_LITE)
545

546
set( kstars_KCFG_SRCS Options.kcfgc )
547
set(libkstarscomponents_SRCS
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
    skycomponents/skylabeler.cpp
    skycomponents/highpmstarlist.cpp
    skycomponents/skymapcomposite.cpp
    skycomponents/skymesh.cpp
    skycomponents/linelistindex.cpp
    skycomponents/linelistlabel.cpp
    skycomponents/noprecessindex.cpp
    skycomponents/listcomponent.cpp
    skycomponents/pointlistcomponent.cpp
    skycomponents/solarsystemsinglecomponent.cpp
    skycomponents/solarsystemlistcomponent.cpp
    skycomponents/asteroidscomponent.cpp
    skycomponents/cometscomponent.cpp
    skycomponents/planetmoonscomponent.cpp
    skycomponents/solarsystemcomposite.cpp
    skycomponents/satellitescomponent.cpp
    skycomponents/starcomponent.cpp
    skycomponents/deepstarcomponent.cpp
    skycomponents/deepskycomponent.cpp
    skycomponents/catalogcomponent.cpp
568
    skycomponents/syncedcatalogcomponent.cpp
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
    skycomponents/constellationartcomponent.cpp
    skycomponents/constellationboundarylines.cpp
    skycomponents/constellationlines.cpp
    skycomponents/constellationnamescomponent.cpp
    skycomponents/supernovaecomponent.cpp
    skycomponents/coordinategrid.cpp
    skycomponents/equatorialcoordinategrid.cpp
    skycomponents/horizontalcoordinategrid.cpp
    skycomponents/ecliptic.cpp
    skycomponents/equator.cpp
    skycomponents/artificialhorizoncomponent.cpp
    skycomponents/horizoncomponent.cpp
    skycomponents/milkyway.cpp
    skycomponents/skycomponent.cpp
    skycomponents/skycomposite.cpp
    skycomponents/starblock.cpp
    skycomponents/starblocklist.cpp
    skycomponents/starblockfactory.cpp
    skycomponents/culturelist.cpp
    skycomponents/flagcomponent.cpp
    skycomponents/targetlistcomponent.cpp
590
    )
591

592
if(NOT BUILD_KSTARS_LITE)
593
    LIST(APPEND libkstarscomponents_SRCS
594
        #skycomponents/notifyupdatesui.cpp
595
        )
596
597
598
599
else(NOT BUILD_KSTARS_LITE)
    set(libkstarstools_SRCS
        tools/nameresolver.cpp
        )
600
endif(NOT BUILD_KSTARS_LITE)
601
602

set(kstars_skyobjects_SRCS
603
604
    skyobjects/constellationsart.cpp
    skyobjects/deepskyobject.cpp
Akarsh Simha's avatar
Akarsh Simha committed
605
#    skyobjects/jupitermoons.cpp
606
    skyobjects/planetmoons.cpp
607
608
609
610
611
    skyobjects/ksasteroid.cpp
    skyobjects/kscomet.cpp
    skyobjects/ksmoon.cpp
    skyobjects/ksplanetbase.cpp
    skyobjects/ksplanet.cpp
612
    #skyobjects/kspluto.cpp
613
614
615
616
617
618
619
620
621
    skyobjects/kssun.cpp
    skyobjects/skyline.cpp
    skyobjects/skyobject.cpp
    skyobjects/skypoint.cpp
    skyobjects/starobject.cpp
    skyobjects/trailobject.cpp
    skyobjects/satellite.cpp
    skyobjects/satellitegroup.cpp
    skyobjects/supernova.cpp
622
    )
623

624
625
626
set(kstars_projection_SRCS
    projections/projector.cpp
    projections/lambertprojector.cpp
Henry de Valence's avatar
Henry de Valence committed
627
    projections/gnomonicprojector.cpp
628
    projections/stereographicprojector.cpp
Henry de Valence's avatar
Henry de Valence committed
629
    projections/orthographicprojector.cpp
630
    projections/azimuthalequidistantprojector.cpp
631
    projections/equirectangularprojector.cpp
632
    )
633

634
set(kstars_extra_SRCS
635
636
    auxiliary/colorscheme.cpp
    auxiliary/dms.cpp
637
    auxiliary/cachingdms.cpp
638
639
640
641
642
643
644
645
646
    auxiliary/geolocation.cpp
    auxiliary/ksfilereader.cpp
    auxiliary/ksuserdb.cpp
    auxiliary/binfilehelper.cpp
    auxiliary/ksutils.cpp
    auxiliary/ksdssimage.cpp
    auxiliary/ksdssdownloader.cpp
    auxiliary/profileinfo.cpp
    auxiliary/filedownloader.cpp
647
    auxiliary/kspaths.cpp
648
    auxiliary/QRoundProgressBar.cpp
649
    auxiliary/skyobjectlistmodel.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
650
    auxiliary/ksnotification.cpp
651
    auxiliary/QProgressIndicator.cpp
652
653
654
655
656
657
    time/simclock.cpp
    time/kstarsdatetime.cpp
    time/timezonerule.cpp
    ksnumbers.cpp
    kstarsdata.cpp
    texturemanager.cpp
658
659
    #to minimize number of indef KSTARS_LITE
    skypainter.cpp
660
    )
661
662

if(NOT BUILD_KSTARS_LITE)
663
    LIST(APPEND kstars_extra_SRCS
664
        auxiliary/imageviewer.cpp
665
        auxiliary/fov.cpp
666
667
668
669
        auxiliary/thumbnailpicker.cpp
        auxiliary/thumbnaileditor.cpp
        auxiliary/imageexporter.cpp
        auxiliary/kswizard.cpp
670
        auxiliary/qcustomplot.cpp
671
672
673
674
675
676
677
678
679
680
681
682
        kstarsdbus.cpp
        kspopupmenu.cpp
        ksalmanac.cpp
        kstarsactions.cpp
        kstarsinit.cpp
        kstars.cpp
        kstarssplash.cpp
        skymap.cpp
        skymapdrawabstract.cpp
        skymapqdraw.cpp
        skymapevents.cpp
        skyqpainter.cpp
683
684
        )
endif(NOT BUILD_KSTARS_LITE)
685

686
if(BUILD_KSTARS_LITE)
687
688
    #Temporary solution to allow use of qml files from source dir DELETE
    add_definitions( -DSOURCE_DIR=\"${kstars_SOURCE_DIR}\" )
689
690
    add_definitions(-DQML_IMPORT="${CMAKE_CURRENT_SOURCE_DIR}")

691
692
693
694
    set(kstarslite_SRCS
        kstarslite.cpp
        kstarsliteinit.cpp
        skymaplite.cpp
695
        skymapliteevents.cpp
696
697
698
        #Wrappers
        kstarslite/skypointlite.cpp
        kstarslite/skyobjectlite.cpp
699
700
        #ImageProvider
        kstarslite/imageprovider.cpp
701
        #Dialogs
702
        kstarslite/dialogs/detaildialoglite.cpp
703
        kstarslite/dialogs/finddialoglite.cpp
704
        kstarslite/dialogs/locationdialoglite.cpp
705
706
        #RootNode
        kstarslite/skyitems/rootnode.cpp
707
708
        kstarslite/skyitems/skyopacitynode.cpp
        kstarslite/skyitems/typedeflite.h
709
710
        #SkyItems
        kstarslite/skyitems/skyitem.cpp
711
712
713
        kstarslite/skyitems/planetsitem.cpp
        kstarslite/skyitems/asteroidsitem.cpp
        kstarslite/skyitems/cometsitem.cpp
714
        kstarslite/skyitems/horizonitem.cpp
715
716
        kstarslite/skyitems/labelsitem.cpp
        kstarslite/skyitems/constellationnamesitem.cpp
717
        kstarslite/skyitems/staritem.cpp
718
        kstarslite/skyitems/deepstaritem.cpp
719
        kstarslite/skyitems/deepskyitem.cpp
720
721
722
        kstarslite/skyitems/constellationartitem.cpp
        kstarslite/skyitems/satellitesitem.cpp
        kstarslite/skyitems/supernovaeitem.cpp
723
        kstarslite/skyitems/fovitem.cpp
724
        kstarslite/skyitems/syncedcatalogitem.cpp
725
        #Line
726
727
728
        kstarslite/skyitems/lines/linesitem.cpp
        kstarslite/skyitems/lines/equatoritem.cpp
        kstarslite/skyitems/lines/eclipticitem.cpp
729
        kstarslite/skyitems/lines/milkywayitem.cpp
730
731
732
733
734
735
        #SkyNodes
        kstarslite/skyitems/skynodes/planetnode.cpp
        kstarslite/skyitems/skynodes/skynode.cpp
        kstarslite/skyitems/skynodes/pointsourcenode.cpp
        kstarslite/skyitems/skynodes/planetmoonsnode.cpp
        kstarslite/skyitems/skynodes/horizonnode.cpp
736
737
        kstarslite/skyitems/skynodes/labelnode.cpp
        kstarslite/skyitems/skynodes/guidelabelnode.cpp
738
739
        kstarslite/skyitems/skynodes/deepskynode.cpp
        kstarslite/skyitems/skynodes/dsosymbolnode.cpp
740
741
742
743
        kstarslite/skyitems/skynodes/skypolygonnode.cpp
        kstarslite/skyitems/skynodes/constellationartnode.cpp
        kstarslite/skyitems/skynodes/satellitenode.cpp
        kstarslite/skyitems/skynodes/supernovanode.cpp
744
        kstarslite/skyitems/skynodes/trixelnode.cpp
745
        kstarslite/skyitems/skynodes/fovsymbolnode.cpp
746
        #Nodes
747
748
749
        kstarslite/skyitems/skynodes/nodes/pointnode.cpp
        kstarslite/skyitems/skynodes/nodes/polynode.cpp
        kstarslite/skyitems/skynodes/nodes/linenode.cpp
750
        kstarslite/skyitems/skynodes/nodes/ellipsenode.cpp
751
        kstarslite/skyitems/skynodes/nodes/rectnode.cpp
752
753
        #Other
        kstarslite/deviceorientation.cpp
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
        #libtess
        libtess/dict.c
        libtess/geom.c
        libtess/gluos.h
        libtess/memalloc.c
        libtess/mesh.c
        libtess/normal.c
        libtess/priorityq-sort.h
        libtess/priorityq.c
        libtess/render.c
        libtess/sweep.c
        libtess/tess.c
        libtess/tessmono.c
        libtess/priorityq-heap.c
        libtess/dict-list.h
        libtess/glu.h
        libtess/tessellate.c
771
772
        )
    #Qml files will be probably moved to user's data dir, but for use
773
774
775
776
    #with QtCreator it is more convenient to have them here
    set(kstarsliteqml_SRCS
        kstarslite/qml/main.qml
        kstarslite/qml/constants/Constants.qml
777
        kstarslite/qml/modules/SkyMapLiteWrapper.qml
778
        kstarslite/qml/modules/BottomMenu.qml
779
        kstarslite/qml/modules/KSPage.qml
780
        kstarslite/qml/modules/KSListView.qml
781
782
783
784
        kstarslite/qml/modules/KSLabel.qml
        kstarslite/qml/modules/KSText.qml
        kstarslite/qml/modules/KSTabButton.qml
        kstarslite/qml/modules/KSTab.qml
785
        kstarslite/qml/modules/KSTabBarArrow.qml
786
787
        kstarslite/qml/modules/KSTextField.qml
        kstarslite/qml/modules/KSButton.qml
788
789
        kstarslite/qml/modules/TopMenu.qml
        kstarslite/qml/modules/helpers/TopMenuButton.qml
790
        kstarslite/qml/modules/helpers/BottomMenuButton.qml
791
        kstarslite/qml/modules/Splash.qml
792
793
794
795
        kstarslite/qml/modules/helpers/TimeSpinBox.qml
        kstarslite/qml/modules/TimePage.qml
        #Popups
        kstarslite/qml/modules/popups/ProjectionsPopup.qml
796
        kstarslite/qml/modules/popups/FOVPopup.qml
797
        kstarslite/qml/modules/popups/ColorSchemePopup.qml
798
799
        #Menus
        kstarslite/qml/modules/menus/ContextMenu.qml
800
801
802
        #Helpers
        kstarslite/qml/modules/helpers/PassiveNotification.qml
        kstarslite/qml/modules/helpers/KSMenuItem.qml
803
        kstarslite/qml/modules/helpers/TelescopeControl.qml
804
805
        #Dialogs
        kstarslite/qml/dialogs/FindDialog.qml
806
807
808
809
810
811
812
813
814
815
        kstarslite/qml/dialogs/LocationDialog.qml
        kstarslite/qml/dialogs/DetailsDialog.qml

        kstarslite/qml/dialogs/helpers/DetailsItem.qml
        kstarslite/qml/dialogs/helpers/DetailsAddLink.qml
        kstarslite/qml/dialogs/helpers/LocationEdit.qml
        kstarslite/qml/dialogs/helpers/LocationLoading.qml

        kstarslite/qml/dialogs/menus/DetailsLinkMenu.qml
        kstarslite/qml/dialogs/menus/LocationsGeoMenu.qml
816
        #INDI
817
818
        kstarslite/qml/indi/INDIControlPanel.qml
        kstarslite/qml/indi/DevicePanel.qml
819
        kstarslite/qml/indi/ImagePreview.qml
820
821
        kstarslite/qml/indi/modules/MotionControl.qml
        kstarslite/qml/indi/modules/Led.qml
822
        kstarslite/qml/indi/modules/KSLed.qml
823
824
        kstarslite/qml/indi/modules/Property.qml
        kstarslite/qml/indi/modules/KSComboBox.qml
825
        kstarslite/qml/indi/modules/KSButtonSwitch.qml
826
827
        kstarslite/qml/indi/modules/KSCheckBox.qml
        kstarslite/qml/indi/modules/KSINDIText.qml
828
829
        kstarslite/qml/indi/modules/KSINDITextField.qml
        kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml
830
831
832
833
834
835
836
837
838
        #Tutorial
        kstarslite/qml/modules/tutorial/TutorialPopup.qml
        kstarslite/qml/modules/tutorial/TutorialExitPopup.qml
        kstarslite/qml/modules/tutorial/TutorialStep1.qml
        kstarslite/qml/modules/tutorial/TutorialStep2.qml
        kstarslite/qml/modules/tutorial/TutorialStep3.qml
        kstarslite/qml/modules/tutorial/TutorialStep4.qml
        kstarslite/qml/modules/tutorial/TutorialStep5.qml
        kstarslite/qml/modules/tutorial/TutorialPane.qml
839
        )
840
    add_subdirectory(kstarslite/qml)
841
842
    ADD_CUSTOM_TARGET(kstarsliteqml SOURCES ${kstarsliteqml_SRCS})

843
844
845
    if(ANDROID)
        add_subdirectory(kstarslite/res)
    endif(ANDROID)
846

847
endif(BUILD_KSTARS_LITE)
848

849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
set(kstars_SRCS
    ${indi_SRCS}
    ${fits_SRCS}
    ${ekos_SRCS}
    ${onlineparser_SRCS}
    ${libkstarswidgets_SRCS}
    ${libkstarscomponents_SRCS}
    ${libkstarstools_SRCS}
    ${kstars_extra_SRCS}
    ${kstars_gl_SRCS}
    ${kstars_projection_SRCS}
    ${xplanet_SRCS}
    ${kstars_options_SRCS}
    ${kstars_skyobjects_SRCS}
    ${kstars_dialogs_SRCS}
    ${oal_SRCS}
    ${printing_SRCS}
866
867
868
    #KStars Lite
    ${kstarslite_SRCS}
    ${indi_lite_SRCS}
869
)
870

871
kconfig_add_kcfg_files(kstars_SRCS ${kstars_KCFG_SRCS})
872

Csaba Kertesz's avatar
Csaba Kertesz committed
873
874
875
876
877
878
IF (UNITY_BUILD)
    ENABLE_UNITY_BUILD(kstars kstars_SRCS 10 cpp)
ENDIF ()

set(kstars_SRCS ${kstars_SRCS} ; ${fits_bayer_SRCS})

879
880
881
if(NOT BUILD_KSTARS_LITE)
    qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.xml kstars.h KStars)
    qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.SimClock.xml simclock.h SimClock)
Jasem Mutlaq's avatar
Jasem Mutlaq committed
882

883
    if (INDI_FOUND)
884
885
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.INDI.xml indi/indidbus.h INDIDBus)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.xml ekos/ekosmanager.h EkosManager)
886
887
888
889
890
891
892
893
894
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Capture.xml ekos/capture/capture.h Ekos::Capture)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Focus.xml ekos/focus/focus.h Ekos::Focus)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Guide.xml ekos/guide/guide.h Ekos::Guide)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Align.xml ekos/align/align.h Ekos::Align)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Mount.xml ekos/mount/mount.h Ekos::Mount)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Dome.xml ekos/auxiliary/dome.h Ekos::Dome)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Weather.xml ekos/auxiliary/weather.h Ekos::Weather)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.DustCap.xml ekos/auxiliary/dustcap.h Ekos::DustCap)
        qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Scheduler.xml ekos/scheduler/scheduler.h Ekos::Scheduler)
895
    endif(INDI_FOUND)
896

897
    ki18n_wrap_ui(kstars_SRCS
898
899
900
901
902
903
904
        ${indiui_SRCS}
        ${ui_SRCS}
        ${fitsui_SRCS}
        ${ekosui_SRCS}
        ${xplanetui_SRCS}
        ${kstars_optionsui_SRCS}
        ${kstars_dialogsui_SRCS}
905
906
907
908
909
910
        ${printingui_SRCS}
        auxiliary/thumbnailpicker.ui
        auxiliary/thumbnaileditor.ui
        oal/observeradd.ui
        oal/equipmentwriter.ui
        oal/execute.ui
911
        #skycomponents/notifyupdatesui.ui
912
913
    )
endif(NOT BUILD_KSTARS_LITE)
914

915
add_library(KStarsLib STATIC ${kstars_SRCS})
916

917
918
if(BUILD_KSTARS_LITE)
    target_link_libraries(KStarsLib
919
920
921
922
923
924
925
926
927
        LibKSDataHandlers
        htmesh
        KF5::I18n
        KF5::Plotting
        KF5::ConfigGui
        Qt5::Gui
        Qt5::Sql
        Qt5::Qml
        Qt5::Quick
928
        Qt5::QuickControls2
929
        Qt5::Positioning
Jasem Mutlaq's avatar
Jasem Mutlaq committed
930
        Qt5::Concurrent
931
932
        ${ZLIB_LIBRARIES}
        )
933
934
935
936

    if (ANDROID)
        target_link_libraries(KStarsLib Qt5::AndroidExtras)
    endif ()
937

938
939
else(BUILD_KSTARS_LITE)
    target_link_libraries(KStarsLib
940
941
942
943
        LibKSDataHandlers
        htmesh
        KF5::Crash
        KF5::I18n
944
        KF5::NewStuff
945
946
947
948
949
950
951
952
953
        KF5::KIOFileWidgets
        KF5::WidgetsAddons
        KF5::Plotting
        Qt5::Gui
        Qt5::PrintSupport
        Qt5::Sql
        Qt5::Svg
        Qt5::Qml
        Qt5::Quick
954
        Qt5::Network
955
        Qt5::Concurrent
956
957
        ${ZLIB_LIBRARIES}
        )
958
959
960
961

    if (KF5NotifyConfig_FOUND)
        target_link_libraries(KStarsLib KF5::NotifyConfig)
    endif(KF5NotifyConfig_FOUND)
962
endif(BUILD_KSTARS_LITE)
963

964
if(NOT WIN32)
965
    target_link_libraries(KStarsLib m)
966
endif(NOT WIN32)
967

968
if (CFITSIO_FOUND)
969
970
    target_link_libraries(KStarsLib ${CFITSIO_LIBRARIES})
endif(CFITSIO_FOUND)
971

972
if(INDI_FOUND)
973
974
975
976
977
978
    if (ANDROID)
        include_directories(${NOVA_INCLUDE_DIR})
    else ()
        find_package(Nova REQUIRED)
        include_directories(${NOVA_INCLUDE_DIR})
    endif ()
979
980
981
982
983
984
985
986
987
988
989

    ## Support Multiple Platforms. All Require INDI + libnova
    ## WIN32 Desktop: Requires INDI Qt5 Client + GSL
    ## WIN32 Lite: Requires INDI Qt5 Client
    ## Linux + MacOS Desktop: Requires INDI Client + GSL
    ## Linux + MacOS Lite: Requires INDI Qt5 Client
    ## Android: Requires INDI Qt5 Client built for Android
    #if(BUILD_KSTARS_LITE)
        #target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT})
    #else(BUILD_KSTARS_LITE)
    if(NOT BUILD_KSTARS_LITE)
990
991
992
        find_package(GSL REQUIRED)
        include_directories(${GSL_INCLUDE_DIRS})
        target_link_libraries(KStarsLib ${GSL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} KF5::Notifications)
993
    endif(NOT BUILD_KSTARS_LITE)
994

995
996
    if(WIN32 OR ANDROID)
        if(ANDROID)
997
            add_definitions(-DUSE_QT5_INDI)
998
            target_link_libraries(KStarsLib ${INDI_CLIENT_ANDROID_LIBRARIES} ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES} ${LIBRAW_LIBRARIES})
999
        else(ANDROID)
1000
            target_link_libraries(KStarsLib ${INDI_CLIENT_LIBRARIES} ${NOVA_LIBRARIES})
For faster browsing, not all history is shown. View entire blame