CMakeLists.txt 33.3 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

Find_package(ZLIB REQUIRED)
15
Find_package(Threads REQUIRED)
16

17 18 19 20 21
if(MSVC)
    add_definitions(-D_USE_MATH_DEFINES=1)
    add_definitions(-DNOMINMAX)
endif()

22 23 24 25 26 27
include_directories(
    ${kstars_SOURCE_DIR}/kstars/skyobjects
    ${kstars_SOURCE_DIR}/kstars/skycomponents
    ${kstars_SOURCE_DIR}/kstars/auxiliary
    ${kstars_SOURCE_DIR}/kstars/time
)
28 29

if(BUILD_KSTARS_LITE)
30
    include_directories(
31
        ${kstars_SOURCE_DIR}/kstars/triangle
Akarsh Simha's avatar
Akarsh Simha committed
32
    )
33 34 35
else(BUILD_KSTARS_LITE)
    include_directories(
        ${kstars_SOURCE_DIR}/kstars/tools
Akarsh Simha's avatar
Akarsh Simha committed
36
    )
37
endif(BUILD_KSTARS_LITE)
38

39
if(NOT BUILD_KSTARS_LITE)
40
    if (CFITSIO_FOUND)
41 42 43 44
        set (fits_SRCS
            fitsviewer/fitshistogram.cpp
            fitsviewer/fitsdata.cpp
            fitsviewer/fitsview.cpp
45
            fitsviewer/fitslabel.cpp
46 47 48 49
            fitsviewer/fitsviewer.cpp
            fitsviewer/fitstab.cpp
            fitsviewer/fitsdebayer.cpp
            fitsviewer/bayer.c
50
            fitsviewer/opsfits.cpp
51 52 53 54 55 56
            )
        set (fitsui_SRCS
            fitsviewer/fitsheaderdialog.ui
            fitsviewer/statform.ui
            fitsviewer/fitsdebayer.ui
            indi/streamform.ui
57
            indi/recordingoptions.ui
58
            fitsviewer/fitshistogramui.ui
59
            fitsviewer/opsfits.ui
60
            )
Artem Fedoskin's avatar
Artem Fedoskin committed
61
        include_directories(${CFITSIO_INCLUDE_DIR})
62
    endif(CFITSIO_FOUND)
63
endif(NOT BUILD_KSTARS_LITE)
64

65
if (INDI_FOUND)
66 67
    if(BUILD_KSTARS_LITE)
            set (fits_SRCS
Jasem Mutlaq's avatar
Jasem Mutlaq committed
68
                fitsviewer/fitsdata.cpp
69 70 71
                fitsviewer/bayer.c
                )
                include_directories(${CFITSIO_INCLUDE_DIR})
72
                include_directories(${NOVA_INCLUDE_DIR})
73 74 75 76 77 78

            set (indi_SRCS
                indi/clientmanagerlite.cpp
                indi/inditelescopelite.cpp
                kstarslite/skyitems/skynodes/crosshairnode.cpp
                kstarslite/skyitems/telescopesymbolsitem.cpp
79
            )
80 81 82 83 84 85 86 87 88
    else(BUILD_KSTARS_LITE)
            set(indiui_SRCS
                indi/streamform.ui
                indi/drivermanager.ui
                indi/opsindi.ui
                indi/indihostconf.ui
                indi/telescopewizard.ui
            )

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
            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
114
                indi/videowg.cpp
115
                indi/indiwebmanager.cpp
116
            )
117

118 119 120 121 122
            if (CFITSIO_FOUND)
                set(ekosui_SRCS
                    ekos/opsekos.ui
                    ekos/ekosmanager.ui
                    ekos/profileeditor.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
123 124 125 126 127 128
                    # Scheduler
                    ekos/scheduler/scheduler.ui
                    ekos/scheduler/mosaic.ui
                    # Capture
                    ekos/capture/capture.ui
                    ekos/capture/calibrationoptions.ui
129
                    ekos/capture/dslrinfo.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
130 131
                    # Align
                    ekos/align/align.ui
132 133 134
                    ekos/align/opsekos.ui
                    ekos/align/opsastrometry.ui
                    ekos/align/opsalign.ui
135 136
                    ekos/align/opsastrometrycfg.ui
                    ekos/align/opsastrometryindexfiles.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
137 138 139 140 141 142
                    # Focus
                    ekos/focus/focus.ui
                    # Mount
                    ekos/mount/mount.ui
                    # Guide
                    ekos/guide/guide.ui
143
                    ekos/guide/opscalibration.ui
144
                    ekos/guide/opsguide.ui
Jasem Mutlaq's avatar
Jasem Mutlaq committed
145 146 147
                    #TODO remove from GIT
                    #ekos/guide/guider.ui
                    #ekos/guide/rcalibration.ui
148 149
                )

150 151 152 153 154
            set(ekos_SRCS
                       ekos/ekos.cpp
                       ekos/ekosmanager.cpp
                       ekos/profileeditor.cpp
                       ekos/opsekos.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
155 156 157 158 159 160 161 162 163 164

                       # 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
165
                       ekos/capture/dslrinfodialog.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
166 167 168 169 170 171 172 173 174 175 176 177 178 179

                       # 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
180
                       ekos/align/alignview.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
181
                       ekos/align/astrometryparser.cpp
182 183
                       ekos/align/opsastrometry.cpp
                       ekos/align/opsalign.cpp
184 185
                       ekos/align/opsastrometrycfg.cpp
                       ekos/align/opsastrometryindexfiles.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
186 187 188 189 190 191
                       ekos/align/offlineastrometryparser.cpp
                       ekos/align/onlineastrometryparser.cpp
                       ekos/align/remoteastrometryparser.cpp

                       # Guide
                       ekos/guide/guide.cpp
192
                       ekos/guide/guideinterface.cpp                       
193
                       ekos/guide/opscalibration.cpp
194
                       ekos/guide/opsguide.cpp
195
                       # Internal Guide                       
Jasem Mutlaq's avatar
Jasem Mutlaq committed
196 197
                       ekos/guide/internalguide/gmath.cpp
                       ekos/guide/internalguide/internalguider.cpp
198
                       #ekos/guide/internalguide/guider.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
199
                       ekos/guide/internalguide/matr.cpp
200
                       #ekos/guide/internalguide/rcalibration.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
201
                       ekos/guide/internalguide/vect.cpp
202
                       # External Guide
203
                       ekos/guide/externalguide/phd2.cpp
204
                       ekos/guide/externalguide/linguider.cpp
205
           )
206 207
            endif(CFITSIO_FOUND)
    endif(BUILD_KSTARS_LITE)
208

209
    include_directories(${INDI_INCLUDE_DIR})
210
endif (INDI_FOUND)
211

212
if(NOT BUILD_KSTARS_LITE)
213 214 215
    if(WCSLIB_FOUND)
      include_directories( ${WCSLIB_INCLUDE_DIR} )
    endif(WCSLIB_FOUND)
216

217 218
    if(XPLANET_FOUND)
        set(xplanet_SRCS
219
            xplanet/opsxplanet.cpp
220
        )
221

222 223
        set(xplanetui_SRCS
            xplanet/opsxplanet.ui
224 225
        )
    endif(XPLANET_FOUND)
226 227 228

    ########### next target ###############
    set(libkstarstools_SRCS
229 230 231 232
        tools/altvstime.cpp
        tools/avtplotwidget.cpp
        tools/calendarwidget.cpp
        tools/conjunctions.cpp
Akarsh Simha's avatar
Akarsh Simha committed
233
#        tools/jmoontool.cpp
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
        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
262
        tools/nameresolver.cpp
263 264 265 266 267 268 269 270

        #FIXME Port to KF5
        #tools/moonphasetool.cpp

        tools/starhopper.cpp
        tools/eyepiecefield.cpp
        tools/exporteyepieceview.cpp
        tools/starhopperdialog.cpp
271
        tools/adddeepskyobject.cpp
272
    )
273

274 275 276
    if(${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
        set(libkstarstools_SRCS
            ${libkstarstools_SRCS}
277 278 279 280 281 282 283 284
            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
285
        )
286 287 288
    endif()

    ki18n_wrap_ui(libkstarstools_SRCS
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
        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
307

308 309 310 311 312 313 314 315 316 317 318 319
        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
320

321 322 323 324 325 326 327 328 329 330 331
        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
332 333
        tools/adddeepskyobject.ui
    )
334 335

    if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
336
        ki18n_wrap_ui(libkstarstools_SRCS
337 338
            tools/whatsinteresting/wilpsettings.ui
            tools/whatsinteresting/wiequipsettings.ui
339
        )
340 341 342
    endif()

    set(libkstarswidgets_SRCS
343 344 345 346 347 348 349 350 351 352 353 354
        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
355 356
    #    widgets/genericcalendarwidget.cpp
    #    widgets/moonphasecalendarwidget.cpp
357
        widgets/kshelplabel.cpp
358
        widgets/unitspinboxwidget.cpp
359
    )
Jasem Mutlaq's avatar
Jasem Mutlaq committed
360

361
    ki18n_wrap_ui(libkstarswidgets_SRCS
362
    #    widgets/genericcalendarwidget.ui
363
        widgets/unitspinboxwidget.ui
364
    )
365

366
    set(kstars_KCFG_SRCS Options.kcfgc)
367

368
    set(kstars_options_SRCS
369 370 371 372 373 374 375
        options/opsadvanced.cpp
        options/opscatalog.cpp
        options/opscolors.cpp
        options/opsguides.cpp
        options/opssolarsystem.cpp
        options/opssatellites.cpp
        options/opssupernovae.cpp
376 377
    )

378
    set(kstars_optionsui_SRCS
379 380 381 382 383 384 385
        options/opsadvanced.ui
        options/opscatalog.ui
        options/opscolors.ui
        options/opsguides.ui
        options/opssolarsystem.ui
        options/opssatellites.ui
        options/opssupernovae.ui
386
    )
387

388
    set(kstars_dialogs_SRCS
389 390 391 392 393 394 395 396 397
        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
398
    )
399

400
    set(kstars_dialogsui_SRCS
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415
        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
416 417
        dialogs/wizdata.ui
        dialogs/wizastrometry.ui
418 419
        dialogs/newfov.ui
        dialogs/exportimagedialog.ui
420
    )
421

422 423 424 425 426 427 428 429 430 431 432 433 434
    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
435 436
    )

437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
    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
    )
458

459 460 461 462 463 464 465 466 467 468 469 470
    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
471
    )
472

473 474 475 476 477 478 479 480 481 482 483 484 485
    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
486
        )
487

488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507
    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
508
        )
509

510 511 512 513 514 515 516 517 518 519 520 521
    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
522
        )
523
endif(NOT BUILD_KSTARS_LITE)
524

525
set( kstars_KCFG_SRCS Options.kcfgc )
526
set(libkstarscomponents_SRCS
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
    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
547
    skycomponents/syncedcatalogcomponent.cpp
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
    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
569
    )
570

571
if(NOT BUILD_KSTARS_LITE)
572
    LIST(APPEND libkstarscomponents_SRCS
573
        #skycomponents/notifyupdatesui.cpp
574
        )
575 576 577 578
else(NOT BUILD_KSTARS_LITE)
    set(libkstarstools_SRCS
        tools/nameresolver.cpp
        )
579
endif(NOT BUILD_KSTARS_LITE)
580 581

set(kstars_skyobjects_SRCS
582 583
    skyobjects/constellationsart.cpp
    skyobjects/deepskyobject.cpp
Akarsh Simha's avatar
Akarsh Simha committed
584 585
#    skyobjects/jupitermoons.cpp
#    skyobjects/planetmoons.cpp
586 587 588 589 590
    skyobjects/ksasteroid.cpp
    skyobjects/kscomet.cpp
    skyobjects/ksmoon.cpp
    skyobjects/ksplanetbase.cpp
    skyobjects/ksplanet.cpp
591
    #skyobjects/kspluto.cpp
592 593 594 595 596 597 598 599 600
    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
601
    )
602

603 604 605
set(kstars_projection_SRCS
    projections/projector.cpp
    projections/lambertprojector.cpp
Henry de Valence's avatar
Henry de Valence committed
606
    projections/gnomonicprojector.cpp
607
    projections/stereographicprojector.cpp
Henry de Valence's avatar
Henry de Valence committed
608
    projections/orthographicprojector.cpp
609
    projections/azimuthalequidistantprojector.cpp
610
    projections/equirectangularprojector.cpp
611
    )
612

613
set(kstars_extra_SRCS
614 615
    auxiliary/colorscheme.cpp
    auxiliary/dms.cpp
616
    auxiliary/cachingdms.cpp
617 618 619 620 621 622 623 624 625
    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
626
    auxiliary/kspaths.cpp
627
    auxiliary/QRoundProgressBar.cpp
628
    auxiliary/skyobjectlistmodel.cpp
Jasem Mutlaq's avatar
Jasem Mutlaq committed
629
    auxiliary/ksnotification.cpp
630
    auxiliary/QProgressIndicator.cpp
631 632 633 634 635 636
    time/simclock.cpp
    time/kstarsdatetime.cpp
    time/timezonerule.cpp
    ksnumbers.cpp
    kstarsdata.cpp
    texturemanager.cpp
637 638
    #to minimize number of indef KSTARS_LITE
    skypainter.cpp
639
    )
640 641

if(NOT BUILD_KSTARS_LITE)
642
    LIST(APPEND kstars_extra_SRCS
643
        auxiliary/imageviewer.cpp
644
        auxiliary/fov.cpp
645 646 647 648
        auxiliary/thumbnailpicker.cpp
        auxiliary/thumbnaileditor.cpp
        auxiliary/imageexporter.cpp
        auxiliary/kswizard.cpp
649
        auxiliary/qcustomplot.cpp
650 651 652 653 654 655 656 657 658 659 660 661
        kstarsdbus.cpp
        kspopupmenu.cpp
        ksalmanac.cpp
        kstarsactions.cpp
        kstarsinit.cpp
        kstars.cpp
        kstarssplash.cpp
        skymap.cpp
        skymapdrawabstract.cpp
        skymapqdraw.cpp
        skymapevents.cpp
        skyqpainter.cpp
662 663
        )
endif(NOT BUILD_KSTARS_LITE)
664

665
if(BUILD_KSTARS_LITE)
666 667
    #Temporary solution to allow use of qml files from source dir DELETE
    add_definitions( -DSOURCE_DIR=\"${kstars_SOURCE_DIR}\" )
668 669
    add_definitions(-DQML_IMPORT="${CMAKE_CURRENT_SOURCE_DIR}")

670 671 672 673
    set(kstarslite_SRCS
        kstarslite.cpp
        kstarsliteinit.cpp
        skymaplite.cpp
674
        skymapliteevents.cpp
675 676 677
        #Wrappers
        kstarslite/skypointlite.cpp
        kstarslite/skyobjectlite.cpp
678 679
        #ImageProvider
        kstarslite/imageprovider.cpp
680
        #Dialogs
681
        kstarslite/dialogs/detaildialoglite.cpp
682
        kstarslite/dialogs/finddialoglite.cpp
683
        kstarslite/dialogs/locationdialoglite.cpp
684 685
        #RootNode
        kstarslite/skyitems/rootnode.cpp
686 687
        kstarslite/skyitems/skyopacitynode.cpp
        kstarslite/skyitems/typedeflite.h
688 689
        #SkyItems
        kstarslite/skyitems/skyitem.cpp
690 691 692
        kstarslite/skyitems/planetsitem.cpp
        kstarslite/skyitems/asteroidsitem.cpp
        kstarslite/skyitems/cometsitem.cpp
693
        kstarslite/skyitems/horizonitem.cpp
694 695
        kstarslite/skyitems/labelsitem.cpp
        kstarslite/skyitems/constellationnamesitem.cpp
696
        kstarslite/skyitems/staritem.cpp
697
        kstarslite/skyitems/deepstaritem.cpp
698
        kstarslite/skyitems/deepskyitem.cpp
699 700 701
        kstarslite/skyitems/constellationartitem.cpp
        kstarslite/skyitems/satellitesitem.cpp
        kstarslite/skyitems/supernovaeitem.cpp
702
        kstarslite/skyitems/fovitem.cpp
703
        kstarslite/skyitems/syncedcatalogitem.cpp
704
        #Line
705 706 707
        kstarslite/skyitems/lines/linesitem.cpp
        kstarslite/skyitems/lines/equatoritem.cpp
        kstarslite/skyitems/lines/eclipticitem.cpp
708
        kstarslite/skyitems/lines/milkywayitem.cpp
709 710 711 712 713 714
        #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
715 716
        kstarslite/skyitems/skynodes/labelnode.cpp
        kstarslite/skyitems/skynodes/guidelabelnode.cpp
717 718
        kstarslite/skyitems/skynodes/deepskynode.cpp
        kstarslite/skyitems/skynodes/dsosymbolnode.cpp
719 720 721 722
        kstarslite/skyitems/skynodes/skypolygonnode.cpp
        kstarslite/skyitems/skynodes/constellationartnode.cpp
        kstarslite/skyitems/skynodes/satellitenode.cpp
        kstarslite/skyitems/skynodes/supernovanode.cpp
723
        kstarslite/skyitems/skynodes/trixelnode.cpp
724
        kstarslite/skyitems/skynodes/fovsymbolnode.cpp
725
        #Nodes
726 727 728
        kstarslite/skyitems/skynodes/nodes/pointnode.cpp
        kstarslite/skyitems/skynodes/nodes/polynode.cpp
        kstarslite/skyitems/skynodes/nodes/linenode.cpp
729
        kstarslite/skyitems/skynodes/nodes/ellipsenode.cpp
730
        kstarslite/skyitems/skynodes/nodes/rectnode.cpp
731 732
        #Other
        kstarslite/deviceorientation.cpp
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749
        #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
750 751
        )
    #Qml files will be probably moved to user's data dir, but for use
752 753 754 755
    #with QtCreator it is more convenient to have them here
    set(kstarsliteqml_SRCS
        kstarslite/qml/main.qml
        kstarslite/qml/constants/Constants.qml
756
        kstarslite/qml/modules/SkyMapLiteWrapper.qml
757
        kstarslite/qml/modules/BottomMenu.qml
758
        kstarslite/qml/modules/KSPage.qml
759
        kstarslite/qml/modules/KSListView.qml
760 761 762 763
        kstarslite/qml/modules/KSLabel.qml
        kstarslite/qml/modules/KSText.qml
        kstarslite/qml/modules/KSTabButton.qml
        kstarslite/qml/modules/KSTab.qml
764
        kstarslite/qml/modules/KSTabBarArrow.qml
765 766
        kstarslite/qml/modules/KSTextField.qml
        kstarslite/qml/modules/KSButton.qml
767 768
        kstarslite/qml/modules/TopMenu.qml
        kstarslite/qml/modules/helpers/TopMenuButton.qml
769
        kstarslite/qml/modules/helpers/BottomMenuButton.qml
770
        kstarslite/qml/modules/Splash.qml
771 772 773 774
        kstarslite/qml/modules/helpers/TimeSpinBox.qml
        kstarslite/qml/modules/TimePage.qml
        #Popups
        kstarslite/qml/modules/popups/ProjectionsPopup.qml
775
        kstarslite/qml/modules/popups/FOVPopup.qml
776
        kstarslite/qml/modules/popups/ColorSchemePopup.qml
777 778
        #Menus
        kstarslite/qml/modules/menus/ContextMenu.qml
779 780 781
        #Helpers
        kstarslite/qml/modules/helpers/PassiveNotification.qml
        kstarslite/qml/modules/helpers/KSMenuItem.qml
782
        kstarslite/qml/modules/helpers/TelescopeControl.qml
783 784
        #Dialogs
        kstarslite/qml/dialogs/FindDialog.qml
785 786 787 788 789 790 791 792 793 794
        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
795
        #INDI
796 797
        kstarslite/qml/indi/INDIControlPanel.qml
        kstarslite/qml/indi/DevicePanel.qml
798
        kstarslite/qml/indi/ImagePreview.qml
799 800
        kstarslite/qml/indi/modules/MotionControl.qml
        kstarslite/qml/indi/modules/Led.qml
801
        kstarslite/qml/indi/modules/KSLed.qml
802 803
        kstarslite/qml/indi/modules/Property.qml
        kstarslite/qml/indi/modules/KSComboBox.qml
804
        kstarslite/qml/indi/modules/KSButtonSwitch.qml
805 806
        kstarslite/qml/indi/modules/KSCheckBox.qml
        kstarslite/qml/indi/modules/KSINDIText.qml
807 808
        kstarslite/qml/indi/modules/KSINDITextField.qml
        kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml
809 810 811 812 813 814 815 816 817
        #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
818
        )
819
    add_subdirectory(kstarslite/qml)
820 821
    ADD_CUSTOM_TARGET(kstarsliteqml SOURCES ${kstarsliteqml_SRCS})

822 823 824
    if(ANDROID)
        add_subdirectory(kstarslite/res)
    endif(ANDROID)
825

826
endif(BUILD_KSTARS_LITE)
827

828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844
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}
845 846 847
    #KStars Lite
    ${kstarslite_SRCS}
    ${indi_lite_SRCS}
848
)
849

850
kconfig_add_kcfg_files(kstars_SRCS ${kstars_KCFG_SRCS})
851

852 853 854
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
855

856
    if (INDI_FOUND)
857 858
        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)
859 860 861 862 863 864 865 866 867
        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)
868
    endif(INDI_FOUND)
869

870
    ki18n_wrap_ui(kstars_SRCS
871 872 873 874 875 876 877
        ${indiui_SRCS}
        ${ui_SRCS}
        ${fitsui_SRCS}
        ${ekosui_SRCS}
        ${xplanetui_SRCS}
        ${kstars_optionsui_SRCS}
        ${kstars_dialogsui_SRCS}
878 879 880 881 882 883
        ${printingui_SRCS}
        auxiliary/thumbnailpicker.ui
        auxiliary/thumbnaileditor.ui
        oal/observeradd.ui
        oal/equipmentwriter.ui
        oal/execute.ui
884
        #skycomponents/notifyupdatesui.ui
885 886
    )
endif(NOT BUILD_KSTARS_LITE)
887

888
add_library(KStarsLib STATIC ${kstars_SRCS})
889

890 891
if(BUILD_KSTARS_LITE)
    target_link_libraries(KStarsLib
892 893 894 895 896 897 898 899 900
        LibKSDataHandlers
        htmesh
        KF5::I18n
        KF5::Plotting
        KF5::ConfigGui
        Qt5::Gui
        Qt5::Sql
        Qt5::Qml
        Qt5::Quick
901
        Qt5::QuickControls2
902
        Qt5::Positioning
Jasem Mutlaq's avatar
Jasem Mutlaq committed
903
        Qt5::Concurrent
904
        ${ZLIB_LIBRARIES}
905
        ${QT_EXTRA_LIBRARIES}
906
        )
907 908
    if(INDI_FOUND)
        if(ANDROID)
909
            #RAWExtractor is needed for converting RAW photos to JPEG in INDI Lite
910
            add_library(RAWExtractor SHARED IMPORTED)
911 912
            include_directories(${BUILD_KSTARSLITE_DIR}/include/libraw)
            set_property(TARGET RAWExtractor PROPERTY IMPORTED_LOCATION ${BUILD_KSTARSLITE_DIR}/android_libs/${ANDROID_ARCHITECTURE}/libRAWExtractor.so)
913 914 915
            target_link_libraries(KStarsLib RAWExtractor)
        endif(ANDROID)
    endif(INDI_FOUND)
916

917 918
else(BUILD_KSTARS_LITE)
    target_link_libraries(KStarsLib
919 920 921 922
        LibKSDataHandlers
        htmesh
        KF5::Crash
        KF5::I18n
923
        KF5::NewStuff        
924 925 926 927 928 929 930 931 932
        KF5::KIOFileWidgets
        KF5::WidgetsAddons
        KF5::Plotting
        Qt5::Gui
        Qt5::PrintSupport
        Qt5::Sql
        Qt5::Svg
        Qt5::Qml
        Qt5::Quick
933
        Qt5::Network
934
        Qt5::Concurrent
935 936
        ${ZLIB_LIBRARIES}
        )
937 938 939 940

    if (KF5NotifyConfig_FOUND)
        target_link_libraries(KStarsLib KF5::NotifyConfig)
    endif(KF5NotifyConfig_FOUND)
941
endif(BUILD_KSTARS_LITE)
942

943
if(NOT WIN32)
944
    target_link_libraries(KStarsLib m)
945
endif(NOT WIN32)
946

947
if (CFITSIO_FOUND)
948 949
    target_link_libraries(KStarsLib ${CFITSIO_LIBRARIES})
endif(CFITSIO_FOUND)
950

951
if(INDI_FOUND)
952
    if(BUILD_KSTARS_LITE)
953 954 955
#        find_package(Nova REQUIRED)
#        target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT} ${NOVA_LIBRARIES})
        target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT} )
956
    else(BUILD_KSTARS_LITE)
957
        target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT} KF5::Notifications)
958
    endif(BUILD_KSTARS_LITE)
959

960
    if(WIN32 OR ANDROID)
961
        add_definitions(-DUSE_QT5_INDI)
962 963 964 965
        find_package(Nova REQUIRED)
        if(ANDROID)
            target_link_libraries(KStarsLib ${NOVA_LIBRARIES} ${INDI_CLIENT_ANDROID_LIBRARIES})
        else(ANDROID)
966
            target_link_libraries(KStarsLib ${NOVA_LIBRARIES} ${INDI_LIBRARIES} ${INDI_CLIENT_QT_LIBRARIES})
967 968 969
        endif(ANDROID)
    else(WIN32 OR ANDROID)
        # If INDI Qt5 Client is found, use it.
970 971 972 973 974
        # Do not use Qt5 client on Linux for now (But KStars Lite needs it - polaris 31.10.2016)
        if(BUILD_KSTARS_LITE)
            add_definitions(-DUSE_QT5_INDI)
            target_link_libraries(KStarsLib ${INDI_LIBRARIES} ${INDI_CLIENT_QT_LIBRARIES} z)
        else(BUILD_KSTARS_LITE)
975
            target_link_libraries(KStarsLib ${INDI_LIBRARIES} ${INDI_CLIENT_LIBRARIES} z)
976
        endif(BUILD_KSTARS_LITE)
977
    endif(WIN32 OR ANDROID)
978

979 980 981
endif(INDI_FOUND)

if(WCSLIB_FOUND)
Rishab Arora's avatar
Rishab Arora committed
982
    target_link_libraries(KStarsLib ${WCSLIB_LIBRARIES})
Jasem Mutlaq's avatar
Jasem Mutlaq committed
983
endif (WCSLIB_FOUND)
984

985 986 987 988 989 990
if(LibRaw_FOUND)
if(NOT BUILD_KSTARS_LITE)
    target_link_libraries(KStarsLib ${LibRaw_LIBRARIES})
endif(NOT BUILD_KSTARS_LITE)
endif (LibRaw_FOUND)

991 992 993 994 995 996 997
#FIXME Enable OpenGL Later
#if( OPENGL_FOUND )
#    target_link_libraries(KStarsLib
#    ${OPENGL_LIBRARIES}
#    ${QT_QTOPENGL_LIBRARY}
#    )
#endif( OPENGL_FOUND )
998

999 1000 1001 1002
set (KSTARS_APP_SRCS
    main.cpp
)

1003
if(NOT BUILD_KSTARS_LITE)
1004 1005 1006 1007 1008 1009 1010 1011 1012
# add icon to application sources
ecm_add_app_icon(KSTARS_APP_SRCS ICONS
    ${CMAKE_CURRENT_SOURCE_DIR}/icons/16-apps-kstars.png
    ${CMAKE_CURRENT_SOURCE_DIR}/icons/32-apps-kstars.png
    ${CMAKE_CURRENT_SOURCE_DIR}/icons/48-apps-kstars.png
    ${CMAKE_CURRENT_SOURCE_DIR}/icons/64-apps-kstars.png
    ${CMAKE_CURRENT_SOURCE_DIR}/icons/128-apps-kstars.png
)

1013
qt5_add_resources(KSTARS_APP_SRCS data/kstars.qrc)
1014
endif(NOT BUILD_KSTARS_LITE)
1015

1016 1017 1018 1019
add_executable(kstars ${KSTARS_APP_SRCS})
target_link_libraries(kstars KStarsLib)

if(NOT BUILD_KSTARS_LITE)
1020
    install(TARGETS kstars ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
1021

1022 1023 1024 1025
    ########### install files ###############
    install(PROGRAMS org.kde.kstars.desktop DESTINATION ${KDE_INSTALL_APPDIR})
    install(FILES kstars.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
    install(FILES kstars.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
1026
endif(NOT BUILD_KSTARS_LITE)