Warning, /education/kstars/kstars/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 if(NOT APPLE) #This is not needed on MacOS, since the data directory and icons are now installed to the app bundle first using the code at the bottom
0002     add_subdirectory( data )
0003     add_subdirectory( icons )
0004 endif(NOT APPLE)
0005 
0006 add_subdirectory( htmesh )
0007 
0008 if (ANDROID AND CMAKE_TOOLCHAIN_FILE)
0009     include(${CMAKE_TOOLCHAIN_FILE})
0010 endif ()
0011 
0012 if (NOT ANDROID)
0013     find_package(ZLIB REQUIRED)
0014     include_directories(${ZLIB_INCLUDE_DIR})
0015     find_package(Threads REQUIRED)
0016 endif ()
0017 
0018 if(MSVC)
0019     add_definitions(-D_USE_MATH_DEFINES=1)
0020     add_definitions(-DNOMINMAX)
0021 endif()
0022 
0023 include(CheckCXXSymbolExists)
0024 check_cxx_symbol_exists(sincos "math.h" HAVE_SINCOS)
0025 if(HAVE_SINCOS)
0026     add_definitions(-DHAVE_SINCOS)
0027 endif()
0028 
0029 include_directories(
0030     ${kstars_SOURCE_DIR}/kstars
0031     ${kstars_SOURCE_DIR}/kstars/skyobjects
0032     ${kstars_SOURCE_DIR}/kstars/skycomponents
0033     ${kstars_SOURCE_DIR}/kstars/auxiliary
0034     ${kstars_SOURCE_DIR}/kstars/time
0035     ${kstars_SOURCE_DIR}/kstars/tools
0036     ${kstars_SOURCE_DIR}/kstars/catalogsdb
0037     ${kstars_SOURCE_DIR}/kstars/polyfills
0038     )
0039 
0040 if (INDI_FOUND)
0041     if(BUILD_KSTARS_LITE)
0042             set (fits_klite_SRCS
0043                 fitsviewer/fitsdata.cpp
0044                 )
0045             set (fits2_klite_SRCS
0046                 fitsviewer/bayer.c
0047                 fitsviewer/fpack.c
0048                 fitsviewer/fpackutil.c
0049                 )
0050                 include_directories(${CFITSIO_INCLUDE_DIR})
0051                 include_directories(${NOVA_INCLUDE_DIR})
0052 
0053             set (indi_klite_SRCS
0054                 indi/clientmanagerlite.cpp
0055                 indi/inditelescopelite.cpp
0056                 kstarslite/skyitems/skynodes/crosshairnode.cpp
0057                 kstarslite/skyitems/telescopesymbolsitem.cpp
0058             )
0059     endif ()
0060 
0061     set(indiui_SRCS
0062         indi/streamform.ui
0063         indi/drivermanager.ui
0064         indi/opsindi.ui
0065         indi/indihostconf.ui
0066         indi/customdrivers.ui
0067         #indi/telescopewizard.ui
0068     )
0069 
0070     set(indi_SRCS
0071         indi/drivermanager.cpp
0072         indi/servermanager.cpp
0073         indi/clientmanager.cpp
0074         indi/blobmanager.cpp
0075         indi/guimanager.cpp
0076         indi/driverinfo.cpp
0077         indi/deviceinfo.cpp
0078         indi/indidevice.cpp
0079         indi/indigroup.cpp
0080         indi/wsmedia.cpp
0081         indi/indiproperty.cpp
0082         indi/indielement.cpp
0083         indi/indistd.cpp
0084         indi/indilistener.cpp
0085         indi/indiconcretedevice.cpp
0086         indi/indiguider.cpp
0087         indi/indimount.cpp
0088         indi/indicamera.cpp
0089         indi/indicamerachip.cpp
0090         indi/indifocuser.cpp
0091         indi/indifilterwheel.cpp
0092         indi/indidome.cpp
0093         indi/indigps.cpp
0094         indi/indiweather.cpp
0095         indi/indidustcap.cpp
0096         indi/indilightbox.cpp
0097         indi/indiauxiliary.cpp
0098         indi/indidetector.cpp
0099         indi/indirotator.cpp
0100         indi/indiadaptiveoptics.cpp
0101         indi/indicorrelator.cpp
0102         indi/indispectrograph.cpp
0103         indi/indidbus.cpp
0104         indi/opsindi.cpp
0105         indi/streamwg.cpp
0106         indi/videowg.cpp
0107         indi/indiwebmanager.cpp
0108         indi/customdrivers.cpp
0109         indi/collimationoverlayoptions.cpp
0110         indi/collimationoverlaytypes.h
0111     )
0112 
0113     if (CFITSIO_FOUND)
0114         set(ekosui_SRCS
0115             ekos/opsekos.ui
0116             ekos/manager.ui
0117             ekos/manager/focusmanager.ui
0118             ekos/manager/guidemanager.ui
0119             ekos/profileeditor.ui
0120             ekos/profilewizard.ui
0121             # Analyze
0122             ekos/analyze/analyze.ui
0123             ekos/analyze/yaxistool.ui
0124             # Scheduler
0125             ekos/scheduler/scheduler.ui
0126             ekos/scheduler/framingassistant.ui
0127             # Capture
0128             ekos/capture/capture.ui
0129             ekos/capture/calibrationoptions.ui
0130             ekos/capture/capturepreviewwidget.ui
0131             ekos/capture/capturecountswidget.ui
0132             ekos/capture/captureprocessoverlay.ui
0133             ekos/capture/dslrinfo.ui
0134             ekos/capture/rotatorsettings.ui
0135             ekos/capture/customproperties.ui
0136             ekos/capture/scriptsmanager.ui
0137             ekos/capture/limits.ui
0138             ekos/capture/sequenceeditorui.ui
0139             # Exposure Calculator
0140             ekos/capture/exposurecalculator/exposurecalculatordialog.ui
0141             ekos/capture/exposurecalculator/fileutilitycameradatadialog.ui            
0142             # Align
0143             ekos/align/align.ui
0144             ekos/align/opsastrometry.ui
0145             ekos/align/opsprograms.ui
0146             ekos/align/opsalign.ui
0147             #ekos/align/opsastrometrycfg.ui
0148             ekos/align/opsastrometryindexfiles.ui
0149             ekos/align/manualrotator.ui
0150             ekos/align/mountmodel.ui
0151             ekos/align/polaralignmentassistant.ui
0152             ekos/align/polaralignwidget.ui
0153             #ekos/align/opsastap.ui
0154             # Focus
0155             ekos/focus/focus.ui
0156             ekos/focus/opsfocussettings.ui
0157             ekos/focus/opsfocusprocess.ui
0158             ekos/focus/opsfocusmechanics.ui
0159             ekos/focus/cfz.ui
0160             ekos/focus/advisor.ui
0161             # Mount
0162             ekos/mount/mount.ui
0163             ekos/mount/meridianflipstatuswidget.ui
0164             # Guide
0165             ekos/guide/guide.ui
0166             ekos/guide/guidestatewidget.ui
0167             ekos/guide/opscalibration.ui
0168             ekos/guide/opsguide.ui
0169             ekos/guide/opsdither.ui
0170             ekos/guide/opsgpg.ui
0171             ekos/guide/manualdither.ui
0172             ekos/guide/manualpulse.ui
0173             ekos/observatory/observatory.ui
0174             #TODO remove from GIT
0175             #ekos/guide/guider.ui
0176             #ekos/guide/rcalibration.ui
0177             # Auxiliary
0178             ekos/auxiliary/filtersettings.ui
0179             ekos/auxiliary/buildfilteroffsets.ui
0180             ekos/auxiliary/opslogs.ui
0181             ekos/auxiliary/serialportassistant.ui
0182             ekos/auxiliary/stellarsolverprofileeditor.ui
0183             ekos/auxiliary/darklibrary.ui
0184             ekos/auxiliary/opticaltrains.ui
0185             ekos/auxiliary/ledstatuswidget.ui
0186             # Ekos Live
0187             ekos/ekoslive/ekoslivedialog.ui
0188             # INDI Hub
0189             ekos/indihub.ui
0190         )
0191         # Aberration Inspector
0192         if (Qt5DataVisualization_FOUND)
0193             set(ekosui_SRCS ${ekosui_SRCS} ekos/focus/aberrationinspector.ui)
0194         endif(Qt5DataVisualization_FOUND)
0195 
0196         set(ekos_SRCS
0197             ekos/ekos.cpp
0198             ekos/profileeditor.cpp
0199             ekos/profilewizard.cpp
0200             ekos/profilescript.cpp
0201             ekos/profilescriptdialog.cpp
0202             ekos/qMDNS.cpp
0203             ekos/opsekos.cpp
0204 
0205             # Manager
0206             ekos/manager.cpp
0207             ekos/manager/focusmanager.cpp
0208             ekos/manager/guidemanager.cpp
0209             ekos/manager/meridianflipstate.cpp
0210 
0211             # Auxiliary
0212             ekos/auxiliary/darklibrary.cpp
0213             ekos/auxiliary/darkprocessor.cpp
0214             ekos/auxiliary/darkview.cpp
0215             ekos/auxiliary/defectmap.cpp
0216             ekos/auxiliary/opticaltrainmanager.cpp
0217             ekos/auxiliary/profilesettings.cpp
0218             ekos/auxiliary/opticaltrainsettings.cpp
0219             ekos/auxiliary/filtermanager.cpp
0220             ekos/auxiliary/buildfilteroffsets.cpp
0221             ekos/auxiliary/tabledelegate.cpp
0222             ekos/auxiliary/opslogs.cpp
0223             ekos/auxiliary/rotatorutils.cpp
0224             ekos/auxiliary/stellarsolverprofileeditor.cpp
0225             ekos/auxiliary/stellarsolverprofile.cpp
0226             ekos/auxiliary/solverutils.cpp
0227             ekos/auxiliary/serialportassistant.cpp
0228             ekos/auxiliary/portselector.cpp
0229             ekos/auxiliary/ledstatuswidget.cpp
0230 
0231             # Capture
0232             ekos/capture/capture.cpp
0233             ekos/capture/captureprocess.cpp
0234             ekos/capture/capturemodulestate.cpp
0235             ekos/capture/capturedeviceadaptor.cpp
0236             ekos/capture/capturepreviewwidget.cpp
0237             ekos/capture/capturecountswidget.cpp
0238             ekos/capture/captureprocessoverlay.cpp
0239             ekos/capture/refocusstate.cpp
0240             ekos/capture/sequencejob.cpp
0241             ekos/capture/sequencejobstate.cpp
0242             ekos/capture/sequencequeue.cpp
0243             ekos/capture/dslrinfodialog.cpp
0244             ekos/capture/rotatorsettings.cpp
0245             ekos/capture/customproperties.cpp
0246             ekos/capture/scriptsmanager.cpp
0247             ekos/capture/placeholderpath.cpp
0248             ekos/capture/sequenceeditor.cpp
0249             
0250             # Exposure Calculator
0251             ekos/capture/exposurecalculator/exposurecalculatordialog.cpp
0252             ekos/capture/exposurecalculator/calculatedgainsubexposuretime.cpp
0253             ekos/capture/exposurecalculator/cameraexposureenvelope.cpp
0254             ekos/capture/exposurecalculator/cameragainreadmode.cpp
0255             ekos/capture/exposurecalculator/cameragainreadnoise.cpp
0256             ekos/capture/exposurecalculator/fileutilitycameradata.cpp
0257             ekos/capture/exposurecalculator/fileutilitycameradatadialog.cpp
0258             ekos/capture/exposurecalculator/imagingcameradata.cpp
0259             ekos/capture/exposurecalculator/optimalexposuredetail.cpp
0260             ekos/capture/exposurecalculator/optimalexposurestack.cpp
0261             ekos/capture/exposurecalculator/optimalsubexposurecalculator.cpp
0262                 
0263             # Analyze
0264             ekos/analyze/analyze.cpp
0265             ekos/analyze/yaxistool.cpp
0266 
0267             # Scheduler
0268             ekos/scheduler/schedulerjob.cpp
0269             ekos/scheduler/scheduler.cpp
0270             ekos/scheduler/schedulermodulestate.cpp
0271             ekos/scheduler/schedulerprocess.cpp
0272             ekos/scheduler/schedulerutils.cpp
0273             ekos/scheduler/schedulertypes.cpp
0274             ekos/scheduler/framingassistantui.cpp
0275             ekos/scheduler/mosaictilesmanager.cpp
0276             ekos/scheduler/mosaictilesmodel.cpp
0277             #ekos/scheduler/mosaicrenderer.cpp
0278             ekos/scheduler/greedyscheduler.cpp
0279 
0280             # Focus
0281             ekos/focus/focus.cpp
0282             ekos/focus/focushfrvplot.cpp
0283             ekos/focus/focusprofileplot.cpp
0284             ekos/focus/focusalgorithms.cpp
0285             ekos/focus/polynomialfit.cpp
0286             ekos/focus/focusstars.cpp
0287             ekos/focus/curvefit.cpp
0288             ekos/focus/focusfwhm.cpp
0289             ekos/focus/focusfourierpower.cpp
0290             ekos/focus/adaptivefocus.cpp
0291             ekos/focus/opsfocussettings.cpp
0292             ekos/focus/opsfocusprocess.cpp
0293             ekos/focus/opsfocusmechanics.cpp
0294 
0295             # Mount
0296             ekos/mount/mount.cpp
0297             ekos/mount/meridianflipstatuswidget.cpp
0298 
0299             # Align
0300             ekos/align/align.cpp
0301             ekos/align/alignview.cpp
0302             ekos/align/astrometryparser.cpp
0303             ekos/align/opsastrometry.cpp
0304             ekos/align/opsalign.cpp
0305             ekos/align/opsprograms.cpp
0306             ekos/align/opsastrometryindexfiles.cpp
0307             ekos/align/remoteastrometryparser.cpp
0308             ekos/align/poleaxis.cpp
0309             ekos/align/polaralign.cpp
0310             ekos/align/rotations.cpp
0311             ekos/align/mountmodel.cpp
0312             ekos/align/polaralignmentassistant.cpp
0313             ekos/align/manualrotator.cpp
0314             ekos/align/polaralignwidget.cpp
0315 
0316             # Guide
0317             ekos/guide/guide.cpp
0318             ekos/guide/guidestatewidget.cpp
0319             ekos/guide/guideinterface.cpp
0320             ekos/guide/opscalibration.cpp
0321             ekos/guide/opsguide.cpp
0322             ekos/guide/opsdither.cpp
0323             ekos/guide/opsgpg.cpp
0324             ekos/guide/guidedriftgraph.cpp
0325             ekos/guide/guidetargetplot.cpp
0326             ekos/guide/manualpulse.cpp
0327             # Internal Guide
0328             ekos/guide/internalguide/gmath.cpp
0329             ekos/guide/internalguide/guidealgorithms.cpp
0330             ekos/guide/internalguide/calibrationprocess.cpp
0331             ekos/guide/internalguide/internalguider.cpp
0332             #ekos/guide/internalguide/guider.cpp
0333             ekos/guide/internalguide/matr.cpp
0334             #ekos/guide/internalguide/rcalibration.cpp
0335             ekos/guide/internalguide/vect.cpp
0336             ekos/guide/internalguide/imageautoguiding.cpp
0337             ekos/guide/internalguide/guidelog.cpp
0338             ekos/guide/internalguide/starcorrespondence.cpp
0339             ekos/guide/internalguide/gpg.cpp
0340             ekos/guide/internalguide/calibration.cpp
0341             ekos/guide/internalguide/guidestars.cpp
0342             ekos/guide/guideview.cpp
0343             # External Guide
0344             ekos/guide/externalguide/phd2.cpp
0345             ekos/guide/externalguide/linguider.cpp
0346 
0347             #Observatory
0348             # Needs to migrate Observatory
0349             ekos/observatory/observatory.cpp
0350 #            ekos/observatory/observatorymodel.cpp
0351 #            ekos/observatory/observatorydomemodel.cpp
0352 #            ekos/observatory/observatoryweathermodel.cpp
0353 
0354             # Ekos Live
0355             ekos/ekoslive/ekosliveclient.cpp
0356             ekos/ekoslive/message.cpp
0357             ekos/ekoslive/media.cpp
0358             ekos/ekoslive/cloud.cpp
0359             ekos/ekoslive/node.cpp
0360             ekos/ekoslive/nodemanager.cpp
0361         )
0362         # Aberration Inspector
0363         if (Qt5DataVisualization_FOUND)
0364             set(ekos_SRCS ${ekos_SRCS} ekos/focus/aberrationinspector.cpp)
0365             set(ekos_SRCS ${ekos_SRCS} ekos/focus/aberrationinspectorplot.cpp)
0366             set(ekos_SRCS ${ekos_SRCS} ekos/focus/sensorgraphic.cpp)
0367             set(ekos_SRCS ${ekos_SRCS} ekos/focus/abinstablewidget.cpp)
0368         endif(Qt5DataVisualization_FOUND)
0369 
0370     endif(CFITSIO_FOUND)
0371 
0372     include_directories(${INDI_INCLUDE_DIR})
0373 endif (INDI_FOUND)
0374 
0375 if (CFITSIO_FOUND)
0376   set (gpg_SRCS
0377         ekos/guide/internalguide/MPI_IS_gaussian_process/src/math_tools.cpp
0378         ekos/guide/internalguide/MPI_IS_gaussian_process/src/covariance_functions.cpp
0379         ekos/guide/internalguide/MPI_IS_gaussian_process/src/gaussian_process.cpp
0380         ekos/guide/internalguide/MPI_IS_gaussian_process/src/gaussian_process_guider.cpp
0381         )
0382     set (sep_SRCS
0383         fitsviewer/sep/analyse.c
0384         fitsviewer/sep/aperture.c
0385         fitsviewer/sep/background.c
0386         fitsviewer/sep/convolve.c
0387         fitsviewer/sep/deblend.c
0388         fitsviewer/sep/extract.c
0389         fitsviewer/sep/lutz.c
0390         fitsviewer/sep/util.c
0391         )
0392 
0393     set (hough_SRCS
0394         fitsviewer/hough/houghline.cpp
0395         )
0396 
0397     set (fits_SRCS
0398         fitsviewer/fitslabel.cpp
0399         fitsviewer/fitsviewer.cpp
0400         fitsviewer/stretch.cpp
0401         fitsviewer/fitstab.cpp
0402         fitsviewer/fitsdebayer.cpp
0403         fitsviewer/opsfits.cpp
0404         )
0405 
0406     if (Qt5DataVisualization_FOUND)
0407         set(fits_SRCS ${fits_SRCS} fitsviewer/starprofileviewer.cpp)
0408     endif()
0409 
0410     set (fits2_SRCS
0411         fitsviewer/bayer.c
0412         fitsviewer/fpack.c
0413         fitsviewer/fpackutil.c
0414         fitsviewer/fitshistogrameditor.cpp
0415         fitsviewer/fitshistogramview.cpp
0416         fitsviewer/fitshistogramcommand.cpp
0417         fitsviewer/fitsview.cpp
0418         fitsviewer/summaryfitsview.cpp
0419         fitsviewer/fitsdata.cpp
0420         fitsviewer/fitsstardetector.cpp
0421         fitsviewer/fitsthresholddetector.cpp
0422         fitsviewer/fitsgradientdetector.cpp
0423         fitsviewer/fitscentroiddetector.cpp
0424         fitsviewer/fitssepdetector.cpp
0425         fitsviewer/fitsbahtinovdetector.cpp
0426         fitsviewer/fitsskyobject.cpp
0427         fitsviewer/fitsstretchui.cpp
0428         )
0429     set (fitsui_SRCS
0430         fitsviewer/fitsheaderdialog.ui
0431         fitsviewer/statform.ui
0432         fitsviewer/platesolve.ui
0433         fitsviewer/fitsdebayer.ui
0434         indi/streamform.ui
0435         indi/recordingoptions.ui
0436         indi/collimationOptions.ui
0437         fitsviewer/fitshistogramui.ui
0438         fitsviewer/fitsstretchui.ui
0439         fitsviewer/opsfits.ui
0440         )
0441     include_directories(${CFITSIO_INCLUDE_DIR})
0442 
0443 endif(CFITSIO_FOUND)
0444 
0445 IF (CFITSIO_FOUND)
0446     IF (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
0447         IF (SANITIZERS)
0448             SET_SOURCE_FILES_PROPERTIES(fitsviewer/bayer.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align -fno-sanitize=address,undefined -fomit-frame-pointer")
0449             SET_SOURCE_FILES_PROPERTIES(fitsviewer/fitsdata.cpp PROPERTIES COMPILE_FLAGS "-fno-sanitize=address,undefined -fomit-frame-pointer")
0450             SET_SOURCE_FILES_PROPERTIES(fitsviewer/fitshistogram.cpp PROPERTIES COMPILE_FLAGS "-fno-sanitize=address,undefined -fomit-frame-pointer")
0451             SET_SOURCE_FILES_PROPERTIES(fitsviewer/fitsview.cpp PROPERTIES COMPILE_FLAGS "-fno-sanitize=address,undefined -fomit-frame-pointer")
0452             SET_SOURCE_FILES_PROPERTIES(fitsviewer/hough/houghline.cpp PROPERTIES COMPILE_FLAGS "-fno-sanitize=address,undefined -fomit-frame-pointer")
0453         ELSE ()
0454             SET_SOURCE_FILES_PROPERTIES(fitsviewer/bayer.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align")
0455         ENDIF ()
0456         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/analyse.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align")
0457         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/aperture.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align -Wno-pointer-arith")
0458         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/background.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align")
0459         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/deblend.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers")
0460         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/extract.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align")
0461         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/lutz.c PROPERTIES COMPILE_FLAGS "-Wno-cast-align")
0462         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/util.c PROPERTIES COMPILE_FLAGS "-Wno-incompatible-pointer-types-discards-qualifiers")
0463         SET_SOURCE_FILES_PROPERTIES(fitsviewer/fpack.c PROPERTIES COMPILE_FLAGS "-Wno-error")
0464         SET_SOURCE_FILES_PROPERTIES(fitsviewer/fpackutil.c PROPERTIES COMPILE_FLAGS "-Wno-error")
0465     ELSEIF (NOT WIN32)
0466         SET_SOURCE_FILES_PROPERTIES(fitsviewer/fpack.c PROPERTIES COMPILE_FLAGS "-Wno-error")
0467         SET_SOURCE_FILES_PROPERTIES(fitsviewer/fpackutil.c PROPERTIES COMPILE_FLAGS "-Wno-error")
0468         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/aperture.c PROPERTIES COMPILE_FLAGS "-Wno-pointer-arith")
0469         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/deblend.c PROPERTIES COMPILE_FLAGS "-Wno-discarded-qualifiers")
0470         SET_SOURCE_FILES_PROPERTIES(fitsviewer/sep/util.c PROPERTIES COMPILE_FLAGS "-Wno-discarded-qualifiers")
0471     ENDIF ()
0472 ENDIF ()
0473 
0474 if(WCSLIB_FOUND)
0475     include_directories( ${WCSLIB_INCLUDE_DIR} )
0476 endif(WCSLIB_FOUND)
0477 
0478 set(xplanet_SRCS
0479     xplanet/opsxplanet.cpp
0480 )
0481 
0482 set(xplanetui_SRCS
0483     xplanet/opsxplanet.ui
0484 )
0485 
0486 ########### next target ###############
0487 set(libkstarstools_SRCS
0488     tools/altvstime.cpp
0489     tools/avtplotwidget.cpp
0490     tools/calendarwidget.cpp
0491     tools/conjunctions.cpp
0492     tools/eclipsetool.cpp
0493     tools/eclipsehandler.cpp
0494 
0495     tools/eclipsetool/lunareclipsehandler.cpp
0496 
0497     tools/jmoontool.cpp
0498     tools/approachsolver.cpp
0499     tools/ksconjunct.cpp
0500     tools/eqplotwidget.cpp
0501     tools/astrocalc.cpp
0502     tools/modcalcangdist.cpp
0503     tools/modcalcapcoord.cpp
0504     tools/modcalcaltaz.cpp
0505     tools/modcalcsimple.cpp
0506     tools/modcalcdaylength.cpp
0507     tools/modcalceclipticcoords.cpp
0508     tools/modcalcvizequinox.cpp
0509     tools/modcalcgalcoord.cpp
0510     tools/modcalcgeodcoord.cpp
0511     tools/modcalcjd.cpp
0512     tools/modcalcplanets.cpp
0513     tools/modcalcsidtime.cpp
0514     tools/modcalcvlsr.cpp
0515     tools/observinglist.cpp
0516     tools/obslistpopupmenu.cpp
0517     tools/sessionsortfilterproxymodel.cpp
0518     tools/obslistwizard.cpp
0519     tools/planetviewer.cpp
0520     tools/pvplotwidget.cpp
0521     tools/scriptargwidgets.cpp
0522     tools/scriptbuilder.cpp
0523     tools/scriptfunction.cpp
0524     tools/skycalendar.cpp
0525     tools/wutdialog.cpp
0526     tools/flagmanager.cpp
0527     tools/horizonmanager.cpp
0528     tools/nameresolver.cpp
0529     tools/polarishourangle.cpp
0530     #FIXME Port to KF5
0531     #tools/moonphasetool.cpp
0532 
0533     tools/starhopper.cpp
0534     tools/eyepiecefield.cpp
0535     tools/exporteyepieceview.cpp
0536     tools/starhopperdialog.cpp
0537     tools/greatcircle.cpp
0538 
0539     tools/import_skycomp.cpp
0540 )
0541 
0542 if(${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
0543     set(libkstarstools_SRCS
0544         ${libkstarstools_SRCS}
0545         tools/whatsinteresting/skyobjlistmodel.cpp
0546         tools/whatsinteresting/wiview.cpp
0547         tools/whatsinteresting/modelmanager.cpp
0548         tools/whatsinteresting/skyobjitem.cpp
0549         tools/whatsinteresting/wilpsettings.cpp
0550         tools/whatsinteresting/wiequipsettings.cpp
0551         tools/whatsinteresting/obsconditions.cpp
0552         tools/whatsinteresting/skyobjdescription.cpp
0553     )
0554 endif()
0555 
0556 ki18n_wrap_ui(libkstarstools_ui_SRCS
0557     tools/altvstime.ui
0558     tools/argchangeviewoption.ui
0559     tools/argexportimage.ui
0560     tools/argloadcolorscheme.ui
0561     tools/arglooktoward.ui
0562     tools/argfindobject.ui
0563     tools/argprintimage.ui
0564     tools/argsetaltaz.ui
0565     tools/argsetcolor.ui
0566     tools/argsetgeolocation.ui
0567     tools/argsetlocaltime.ui
0568     tools/argsetradec.ui
0569     tools/argsettrack.ui
0570     tools/argtimescale.ui
0571     tools/argwaitfor.ui
0572     tools/argwaitforkey.ui
0573     tools/argzoom.ui
0574     tools/conjunctions.ui
0575     tools/eclipsetool.ui
0576 
0577     tools/modcalcangdist.ui
0578     tools/modcalcapcoord.ui
0579     tools/modcalcaltaz.ui
0580     tools/modcalcsimple.ui
0581     tools/modcalcdaylength.ui
0582     tools/modcalceclipticcoords.ui
0583     tools/modcalcvizequinox.ui
0584     tools/modcalcgalcoord.ui
0585     tools/modcalcgeod.ui
0586     tools/modcalcjd.ui
0587     tools/modcalcplanets.ui
0588     tools/modcalcsidtime.ui
0589     tools/modcalcvlsr.ui
0590     tools/observinglist.ui
0591     tools/obslistwizard.ui
0592     tools/optionstreeview.ui
0593     tools/planetviewer.ui
0594     tools/scriptbuilder.ui
0595     tools/scriptnamedialog.ui
0596     tools/skycalendar.ui
0597     tools/wutdialog.ui
0598     tools/flagmanager.ui
0599     tools/starhopperdialog.ui
0600     tools/horizonmanager.ui
0601     tools/polarishourangle.ui
0602 )
0603 
0604 if (${KF5_VERSION} VERSION_EQUAL 5.18.0 OR ${KF5_VERSION} VERSION_GREATER 5.18.0)
0605     ki18n_wrap_ui(libkstarstools_ui_SRCS
0606         tools/whatsinteresting/wilpsettings.ui
0607         tools/whatsinteresting/wiequipsettings.ui
0608     )
0609 endif()
0610 
0611 set(libkstarswidgets_SRCS
0612     widgets/clicklabel.cpp
0613     widgets/dmsbox.cpp
0614     widgets/draglistbox.cpp
0615     widgets/fovwidget.cpp
0616     widgets/logedit.cpp
0617     widgets/magnitudespinbox.cpp
0618     widgets/mapcanvas.cpp
0619     widgets/thumbimage.cpp
0620     widgets/timespinbox.cpp
0621     widgets/timestepbox.cpp
0622     widgets/timeunitbox.cpp
0623     widgets/infoboxwidget.cpp
0624 #    widgets/genericcalendarwidget.cpp
0625 #    widgets/moonphasecalendarwidget.cpp
0626     widgets/kshelplabel.cpp
0627     widgets/unitspinboxwidget.cpp
0628 )
0629 
0630 ki18n_wrap_ui(libkstarswidgets_ui_SRCS
0631 #    widgets/genericcalendarwidget.ui
0632     widgets/unitspinboxwidget.ui
0633 )
0634 
0635 set(kstars_options_SRCS
0636     options/opsadvanced.cpp
0637     options/opscatalog.cpp
0638     options/opscolors.cpp
0639     options/opsguides.cpp
0640     options/opssolarsystem.cpp
0641     options/opssatellites.cpp
0642     options/opssupernovae.cpp
0643     options/opsterrain.cpp
0644     options/opsimageoverlay.cpp
0645     options/opsdeveloper.cpp
0646 )
0647 
0648 set(kstars_optionsui_SRCS
0649     options/opsadvanced.ui
0650     options/opscatalog.ui
0651     options/opscolors.ui
0652     options/opsguides.ui
0653     options/opssolarsystem.ui
0654     options/opssatellites.ui
0655     options/opssupernovae.ui
0656     options/opsterrain.ui
0657     options/opsimageoverlay.ui
0658     options/opsdeveloper.ui
0659 )
0660 
0661 set(kstars_dialogs_SRCS
0662     dialogs/addcatalogobject.cpp
0663     dialogs/catalogsdbui.cpp
0664     dialogs/catalogeditform.cpp
0665     dialogs/catalogcoloreditor.cpp
0666     dialogs/catalogdetails.cpp
0667     dialogs/catalogcsvimport.cpp
0668     dialogs/catalogobjectlistmodel.cpp
0669     dialogs/addlinkdialog.cpp
0670     dialogs/detaildialog.cpp
0671     dialogs/finddialog.cpp
0672     dialogs/focusdialog.cpp
0673     dialogs/fovdialog.cpp
0674     dialogs/locationdialog.cpp
0675     dialogs/timedialog.cpp
0676     dialogs/exportimagedialog.cpp
0677 )
0678 
0679 set(kstars_dialogsui_SRCS
0680     dialogs/addcatalogobject.ui
0681     dialogs/catalogsdbui.ui
0682     dialogs/catalogeditform.ui
0683     dialogs/catalogcoloreditor.ui
0684     dialogs/catalogdetails.ui
0685     dialogs/catalogcsvimport.ui
0686     dialogs/addlinkdialog.ui
0687     dialogs/details_database.ui
0688     dialogs/details_data.ui
0689     dialogs/details_data_comet.ui
0690     dialogs/details_links.ui
0691     dialogs/details_log.ui
0692     dialogs/details_position.ui
0693     dialogs/finddialog.ui
0694     dialogs/focusdialog.ui
0695     dialogs/fovdialog.ui
0696     dialogs/locationdialog.ui
0697     dialogs/wizwelcome.ui
0698     dialogs/wizlocation.ui
0699     dialogs/wizdownload.ui
0700     dialogs/wizdata.ui
0701     dialogs/newfov.ui
0702     dialogs/exportimagedialog.ui
0703 )
0704 
0705 set(hips_SRCS
0706     hips/healpix.cpp
0707     hips/hipsrenderer.cpp
0708     hips/hipsfinder.cpp
0709     hips/scanrender.cpp
0710     hips/pixcache.cpp
0711     hips/urlfiledownload.cpp
0712     hips/opships.cpp
0713 )
0714 
0715 set(terrain_SRCS
0716     terrain/terrainrenderer.cpp
0717 )
0718 
0719 set(hips_manager_SRCS
0720     hips/hipsmanager.cpp
0721 )
0722 
0723 set(oal_SRCS
0724     oal/log.cpp
0725     oal/observer.cpp
0726     oal/site.cpp
0727     oal/session.cpp
0728     oal/scope.cpp
0729     oal/dslrlens.cpp
0730     oal/eyepiece.cpp
0731     oal/filter.cpp
0732     oal/observation.cpp
0733     oal/lens.cpp
0734     oal/equipmentwriter.cpp
0735     oal/observeradd.cpp
0736     oal/execute.cpp
0737 )
0738 
0739 set(printing_SRCS
0740     printing/detailstable.cpp
0741     printing/finderchart.cpp
0742     printing/foveditordialog.cpp
0743     printing/fovsnapshot.cpp
0744     printing/kstarsdocument.cpp
0745     printing/legend.cpp
0746     printing/loggingform.cpp
0747     printing/printingwizard.cpp
0748     printing/pwizchartconfig.cpp
0749     printing/pwizchartcontents.cpp
0750     printing/pwizfovbrowse.cpp
0751     printing/pwizfovconfig.cpp
0752     printing/pwizfovmanual.cpp
0753     printing/pwizfovsh.cpp
0754     printing/pwizfovtypeselection.cpp
0755     printing/pwizobjectselection.cpp
0756     printing/pwizprint.cpp
0757     printing/shfovexporter.cpp
0758     printing/simplefovexporter.cpp
0759 )
0760 
0761 set(printingui_SRCS
0762     printing/foveditordialog.ui
0763     printing/pwizchartconfig.ui
0764     printing/pwizchartcontents.ui
0765     printing/pwizfovbrowse.ui
0766     printing/pwizfovconfig.ui
0767     printing/pwizfovmanual.ui
0768     printing/pwizfovsh.ui
0769     printing/pwizfovtypeselection.ui
0770     printing/pwizobjectselection.ui
0771     printing/pwizprint.ui
0772     printing/pwizwelcome.ui
0773 )
0774 
0775 set(libkstarscomponents_SRCS
0776     skycomponents/skylabeler.cpp
0777     skycomponents/highpmstarlist.cpp
0778     skycomponents/skymapcomposite.cpp
0779     skycomponents/skymesh.cpp
0780     skycomponents/linelistindex.cpp
0781     skycomponents/linelistlabel.cpp
0782     skycomponents/noprecessindex.cpp
0783     skycomponents/listcomponent.cpp
0784     skycomponents/pointlistcomponent.cpp
0785     skycomponents/solarsystemsinglecomponent.cpp
0786     skycomponents/solarsystemlistcomponent.cpp
0787     skycomponents/earthshadowcomponent.cpp
0788     skycomponents/asteroidscomponent.cpp
0789     skycomponents/cometscomponent.cpp
0790     skycomponents/planetmoonscomponent.cpp
0791     skycomponents/solarsystemcomposite.cpp
0792     skycomponents/satellitescomponent.cpp
0793     skycomponents/starcomponent.cpp
0794     skycomponents/deepstarcomponent.cpp
0795     skycomponents/catalogscomponent.cpp
0796     skycomponents/constellationartcomponent.cpp
0797     skycomponents/constellationboundarylines.cpp
0798     skycomponents/constellationlines.cpp
0799     skycomponents/constellationnamescomponent.cpp
0800     skycomponents/supernovaecomponent.cpp
0801     skycomponents/coordinategrid.cpp
0802     skycomponents/equatorialcoordinategrid.cpp
0803     skycomponents/horizontalcoordinategrid.cpp
0804     skycomponents/localmeridiancomponent.cpp
0805     skycomponents/ecliptic.cpp
0806     skycomponents/equator.cpp
0807     skycomponents/artificialhorizoncomponent.cpp
0808     skycomponents/hipscomponent.cpp
0809     skycomponents/terraincomponent.cpp
0810     skycomponents/imageoverlaycomponent.cpp
0811     skycomponents/horizoncomponent.cpp
0812     skycomponents/milkyway.cpp
0813     skycomponents/skycomponent.cpp
0814     skycomponents/skycomposite.cpp
0815     skycomponents/starblock.cpp
0816     skycomponents/starblocklist.cpp
0817     skycomponents/starblockfactory.cpp
0818     skycomponents/culturelist.cpp
0819     skycomponents/flagcomponent.cpp
0820     skycomponents/targetlistcomponent.cpp
0821     )
0822 
0823 IF (INDI_FOUND)
0824 LIST(APPEND libkstarscomponents_SRCS
0825     skycomponents/mosaiccomponent.cpp
0826     )
0827 ENDIF(INDI_FOUND)
0828 
0829 #LIST(APPEND libkstarscomponents_SRCS
0830 #    #skycomponents/notifyupdatesui.cpp
0831 #    )
0832 
0833 IF (BUILD_KSTARS_LITE)
0834     set(libkstarstools_ui_klite_SRCS
0835         tools/nameresolver.cpp
0836         )
0837 ENDIF ()
0838 
0839 set(kstars_skyobjects_SRCS
0840     skyobjects/constellationsart.cpp
0841     skyobjects/catalogobject.cpp
0842     skyobjects/jupitermoons.cpp
0843     skyobjects/planetmoons.cpp
0844     skyobjects/ksasteroid.cpp
0845     skyobjects/kscomet.cpp
0846     skyobjects/ksmoon.cpp
0847     skyobjects/ksearthshadow.cpp
0848     skyobjects/ksplanetbase.cpp
0849     skyobjects/ksplanet.cpp
0850     #skyobjects/kspluto.cpp
0851     skyobjects/kssun.cpp
0852     skyobjects/skyline.cpp
0853     skyobjects/skyobject.cpp
0854     skyobjects/skypoint.cpp
0855     skyobjects/starobject.cpp
0856     skyobjects/trailobject.cpp
0857     skyobjects/satellite.cpp
0858     skyobjects/satellitegroup.cpp
0859     skyobjects/supernova.cpp
0860     )
0861 
0862 IF (INDI_FOUND)
0863 LIST(APPEND kstars_skyobjects_SRCS
0864     skyobjects/mosaictiles.cpp
0865     )
0866 ENDIF(INDI_FOUND)
0867 
0868 set(kstars_projection_SRCS
0869     projections/projector.cpp
0870     projections/lambertprojector.cpp
0871     projections/gnomonicprojector.cpp
0872     projections/stereographicprojector.cpp
0873     projections/orthographicprojector.cpp
0874     projections/azimuthalequidistantprojector.cpp
0875     projections/equirectangularprojector.cpp
0876     )
0877 
0878 set(kstars_extra_SRCS
0879     auxiliary/colorscheme.cpp
0880     auxiliary/dms.cpp
0881     auxiliary/cachingdms.cpp
0882     auxiliary/geolocation.cpp
0883     auxiliary/ksfilereader.cpp
0884     auxiliary/ksuserdb.cpp
0885     auxiliary/binfilehelper.cpp
0886     auxiliary/ksutils.cpp
0887     auxiliary/ksdssimage.cpp
0888     auxiliary/ksdssdownloader.cpp
0889     auxiliary/nonlineardoublespinbox.cpp
0890     auxiliary/profileinfo.cpp
0891     auxiliary/filedownloader.cpp
0892     auxiliary/kspaths.cpp
0893     auxiliary/QRoundProgressBar.cpp
0894     auxiliary/skyobjectlistmodel.cpp
0895     auxiliary/ksnotification.cpp
0896     auxiliary/ksmessagebox.cpp
0897     auxiliary/QProgressIndicator.cpp
0898     auxiliary/ctkrangeslider.cpp
0899     auxiliary/ctk3slider.cpp
0900     auxiliary/rectangleoverlap.cpp
0901     auxiliary/gslhelpers.cpp
0902     auxiliary/robuststatistics.cpp
0903     time/simclock.cpp
0904     time/kstarsdatetime.cpp
0905     time/timezonerule.cpp
0906     ksnumbers.cpp
0907     kstarsdata.cpp
0908     texturemanager.cpp
0909     #to minimize number of indef KSTARS_LITE
0910     skypainter.cpp    
0911     )
0912 
0913 SET(kstars_extra_kstars_SRCS
0914     auxiliary/thememanager.cpp
0915     auxiliary/schememanager.cpp
0916     auxiliary/imagemask.cpp
0917     auxiliary/imageviewer.cpp
0918     auxiliary/xplanetimageviewer.cpp
0919     auxiliary/fov.cpp
0920     auxiliary/thumbnailpicker.cpp
0921     auxiliary/thumbnaileditor.cpp
0922     auxiliary/imageexporter.cpp
0923     auxiliary/kswizard.cpp
0924     auxiliary/qcustomplot.cpp
0925     kstarsdbus.cpp
0926     kspopupmenu.cpp
0927     ksalmanac.cpp
0928     kstarsactions.cpp
0929     kstarsinit.cpp
0930     kstars.cpp
0931     kstarssplash.cpp
0932     skymap.cpp
0933     skymapdrawabstract.cpp
0934     skymapqdraw.cpp
0935     skymapevents.cpp
0936     skyqpainter.cpp
0937     )
0938 
0939 SET(catalogsdb_SRCS
0940         catalogsdb/catalogsdb.cpp)
0941 
0942 if(NOT APPLE) #KStarsLite files including the QML files are not needed on MacOS right now
0943 # Temporary solution to allow use of qml files from source dir DELETE
0944 SET(KSTARSLITE_CPP_OPTIONS -DSOURCE_DIR=\"${kstars_SOURCE_DIR}\" -DQML_IMPORT="${CMAKE_CURRENT_SOURCE_DIR}")
0945 
0946 set(klite_SRCS
0947     kstarslite.cpp
0948     kstarsliteinit.cpp
0949     skymaplite.cpp
0950     skymapliteevents.cpp
0951     #Wrappers
0952     kstarslite/skypointlite.cpp
0953     kstarslite/skyobjectlite.cpp
0954     #ImageProvider
0955     kstarslite/imageprovider.cpp
0956     #Dialogs
0957     kstarslite/dialogs/detaildialoglite.cpp
0958     kstarslite/dialogs/finddialoglite.cpp
0959     kstarslite/dialogs/locationdialoglite.cpp
0960     #RootNode
0961     kstarslite/skyitems/rootnode.cpp
0962     kstarslite/skyitems/skyopacitynode.cpp
0963     kstarslite/skyitems/typedeflite.h
0964     #SkyItems
0965     kstarslite/skyitems/skyitem.cpp
0966     kstarslite/skyitems/planetsitem.cpp
0967     kstarslite/skyitems/asteroidsitem.cpp
0968     kstarslite/skyitems/cometsitem.cpp
0969     kstarslite/skyitems/horizonitem.cpp
0970     kstarslite/skyitems/labelsitem.cpp
0971     kstarslite/skyitems/constellationnamesitem.cpp
0972     kstarslite/skyitems/staritem.cpp
0973     kstarslite/skyitems/deepstaritem.cpp
0974     kstarslite/skyitems/deepskyitem.cpp
0975     kstarslite/skyitems/constellationartitem.cpp
0976     kstarslite/skyitems/satellitesitem.cpp
0977     kstarslite/skyitems/supernovaeitem.cpp
0978     kstarslite/skyitems/fovitem.cpp
0979     #Line
0980     kstarslite/skyitems/lines/linesitem.cpp
0981     kstarslite/skyitems/lines/equatoritem.cpp
0982     kstarslite/skyitems/lines/eclipticitem.cpp
0983     kstarslite/skyitems/lines/milkywayitem.cpp
0984     #SkyNodes
0985     kstarslite/skyitems/skynodes/planetnode.cpp
0986     kstarslite/skyitems/skynodes/skynode.cpp
0987     kstarslite/skyitems/skynodes/pointsourcenode.cpp
0988     kstarslite/skyitems/skynodes/planetmoonsnode.cpp
0989     kstarslite/skyitems/skynodes/horizonnode.cpp
0990     kstarslite/skyitems/skynodes/labelnode.cpp
0991     kstarslite/skyitems/skynodes/guidelabelnode.cpp
0992     kstarslite/skyitems/skynodes/deepskynode.cpp
0993     kstarslite/skyitems/skynodes/dsosymbolnode.cpp
0994     kstarslite/skyitems/skynodes/skypolygonnode.cpp
0995     kstarslite/skyitems/skynodes/constellationartnode.cpp
0996     kstarslite/skyitems/skynodes/satellitenode.cpp
0997     kstarslite/skyitems/skynodes/supernovanode.cpp
0998     kstarslite/skyitems/skynodes/trixelnode.cpp
0999     kstarslite/skyitems/skynodes/fovsymbolnode.cpp
1000     #Nodes
1001     kstarslite/skyitems/skynodes/nodes/pointnode.cpp
1002     kstarslite/skyitems/skynodes/nodes/polynode.cpp
1003     kstarslite/skyitems/skynodes/nodes/linenode.cpp
1004     kstarslite/skyitems/skynodes/nodes/ellipsenode.cpp
1005     kstarslite/skyitems/skynodes/nodes/rectnode.cpp
1006     #Other
1007     kstarslite/deviceorientation.cpp
1008     )
1009 
1010 set(kstarslite_libtess_SRC
1011     #libtess
1012     libtess/gluos.h
1013     libtess/priorityq-sort.h
1014     libtess/sweep.c
1015     libtess/tessmono.c
1016     libtess/dict-list.h
1017     libtess/glu.h
1018     libtess/tessellate.c
1019     libtess/dict.c
1020     libtess/geom.c
1021     libtess/memalloc.c
1022     libtess/mesh.c
1023     libtess/normal.c
1024     libtess/priorityq.c
1025     libtess/priorityq-heap.c
1026     libtess/render.c
1027     libtess/tess.c
1028     )
1029 
1030 IF (BUILD_KSTARS_LITE)
1031     ADD_CUSTOM_TARGET(convert_translations ${CMAKE_SOURCE_DIR}/tools/convert_translations.sh ${CMAKE_BINARY_DIR}
1032                       WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
1033     ADD_DEPENDENCIES(convert_translations fetch-translations)
1034     IF (ANDROID)
1035         ADD_CUSTOM_TARGET(convert_translations_to_android ${CMAKE_SOURCE_DIR}/tools/convert_translations.sh ${CMAKE_BINARY_DIR}/packaging/android/export/share/kstars
1036                           WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
1037         ADD_DEPENDENCIES(convert_translations_to_android fetch-translations)
1038     ENDIF ()
1039 ENDIF ()
1040 
1041 IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
1042     SET_SOURCE_FILES_PROPERTIES(${kstarslite_libtess_SRC} PROPERTIES COMPILE_FLAGS "-Wno-error")
1043 ENDIF ()
1044 
1045 #Qml files will be probably moved to user's data dir, but for use
1046 #with QtCreator it is more convenient to have them here
1047 set(kstarsliteqml_SRCS
1048     kstarslite/qml/main.qml
1049     kstarslite/qml/constants/Constants.qml
1050     kstarslite/qml/modules/SkyMapLiteWrapper.qml
1051     kstarslite/qml/modules/BottomMenu.qml
1052     kstarslite/qml/modules/KSPage.qml
1053     kstarslite/qml/modules/KSListView.qml
1054     kstarslite/qml/modules/KSLabel.qml
1055     kstarslite/qml/modules/KSText.qml
1056     kstarslite/qml/modules/KSTabButton.qml
1057     kstarslite/qml/modules/KSTab.qml
1058     kstarslite/qml/modules/KSTabBarArrow.qml
1059     kstarslite/qml/modules/KSTextField.qml
1060     kstarslite/qml/modules/KSButton.qml
1061     kstarslite/qml/modules/TopMenu.qml
1062     kstarslite/qml/modules/helpers/TopMenuButton.qml
1063     kstarslite/qml/modules/helpers/BottomMenuButton.qml
1064     kstarslite/qml/modules/Splash.qml
1065     kstarslite/qml/modules/helpers/TimeSpinBox.qml
1066     kstarslite/qml/modules/TimePage.qml
1067     #Popups
1068     kstarslite/qml/modules/popups/ProjectionsPopup.qml
1069     kstarslite/qml/modules/popups/FOVPopup.qml
1070     kstarslite/qml/modules/popups/ColorSchemePopup.qml
1071     #Menus
1072     kstarslite/qml/modules/menus/ContextMenu.qml
1073     #Helpers
1074     kstarslite/qml/modules/helpers/PassiveNotification.qml
1075     kstarslite/qml/modules/helpers/KSMenuItem.qml
1076     kstarslite/qml/modules/helpers/TelescopeControl.qml
1077     #Dialogs
1078     kstarslite/qml/dialogs/FindDialog.qml
1079     kstarslite/qml/dialogs/LocationDialog.qml
1080     kstarslite/qml/dialogs/DetailsDialog.qml
1081     kstarslite/qml/dialogs/AboutDialog.qml
1082 
1083     kstarslite/qml/dialogs/helpers/DetailsItem.qml
1084     kstarslite/qml/dialogs/helpers/DetailsAddLink.qml
1085     kstarslite/qml/dialogs/helpers/LocationEdit.qml
1086     kstarslite/qml/dialogs/helpers/LocationLoading.qml
1087 
1088     kstarslite/qml/dialogs/menus/DetailsLinkMenu.qml
1089     kstarslite/qml/dialogs/menus/LocationsGeoMenu.qml
1090     #INDI
1091     kstarslite/qml/indi/INDIControlPanel.qml
1092     kstarslite/qml/indi/DevicePanel.qml
1093     kstarslite/qml/indi/ImagePreview.qml
1094     kstarslite/qml/indi/modules/MotionControl.qml
1095     kstarslite/qml/indi/modules/Led.qml
1096     kstarslite/qml/indi/modules/KSLed.qml
1097     kstarslite/qml/indi/modules/Property.qml
1098     kstarslite/qml/indi/modules/KSComboBox.qml
1099     kstarslite/qml/indi/modules/KSButtonSwitch.qml
1100     kstarslite/qml/indi/modules/KSCheckBox.qml
1101     kstarslite/qml/indi/modules/KSINDIText.qml
1102     kstarslite/qml/indi/modules/KSINDITextField.qml
1103     kstarslite/qml/indi/modules/KSButtonsSwitchRow.qml
1104     #Tutorial
1105     kstarslite/qml/modules/tutorial/TutorialPopup.qml
1106     kstarslite/qml/modules/tutorial/TutorialExitPopup.qml
1107     kstarslite/qml/modules/tutorial/TutorialStep1.qml
1108     kstarslite/qml/modules/tutorial/TutorialStep2.qml
1109     kstarslite/qml/modules/tutorial/TutorialStep3.qml
1110     kstarslite/qml/modules/tutorial/TutorialStep4.qml
1111     kstarslite/qml/modules/tutorial/TutorialStep5.qml
1112     kstarslite/qml/modules/tutorial/TutorialPane.qml
1113     )
1114 add_subdirectory(kstarslite/qml)
1115 ADD_CUSTOM_TARGET(kstarsliteqml SOURCES ${kstarsliteqml_SRCS})
1116 endif(NOT APPLE) #This is the end of the Mac KStars disabling of the KStarsLite Code
1117 
1118 if(ANDROID)
1119     add_subdirectory(kstarslite/res)
1120 endif(ANDROID)
1121 
1122 set(kstars_SRCS
1123     ${indi_SRCS}
1124     ${fits_SRCS}
1125     ${ekos_SRCS}
1126     ${libkstarswidgets_SRCS}
1127     ${libkstarscomponents_SRCS}
1128     ${libkstarstools_SRCS}
1129     ${kstars_extra_SRCS}
1130     ${kstars_extra_kstars_SRCS}
1131     ${kstars_projection_SRCS}
1132     ${xplanet_SRCS}
1133     ${kstars_options_SRCS}
1134     ${kstars_skyobjects_SRCS}
1135     ${kstars_dialogs_SRCS}
1136     ${hips_SRCS}
1137     ${terrain_SRCS}
1138     ${oal_SRCS}
1139     ${printing_SRCS}
1140     ${catalogsdb_SRCS}
1141     #KStars Lite
1142     ${kstarslite_SRCS}
1143     # Generated files
1144     ${libkstarstools_ui_SRCS}
1145     ${libkstarswidgets_ui_SRCS}
1146 )
1147 
1148 set(kstarslite_SRCS
1149     ${indi_klite_SRCS}
1150     ${libkstarscomponents_SRCS}
1151     ${kstars_extra_SRCS}
1152     ${kstars_projection_SRCS}
1153     ${kstars_skyobjects_SRCS}
1154 
1155     # KStars Lite sources
1156     ${klite_SRCS}
1157     # Generated files
1158     ${libkstarstools_ui_klite_SRCS}
1159 )
1160 
1161 # Generate all the necessary QLoggingCategory files
1162 ecm_qt_declare_logging_category(kstars_SRCS HEADER kstars_debug.h IDENTIFIER KSTARS CATEGORY_NAME org.kde.kstars)
1163 ecm_qt_declare_logging_category(kstars_SRCS HEADER indi_debug.h IDENTIFIER KSTARS_INDI CATEGORY_NAME org.kde.kstars.indi)
1164 ecm_qt_declare_logging_category(kstars_SRCS HEADER fits_debug.h IDENTIFIER KSTARS_FITS CATEGORY_NAME org.kde.kstars.fits)
1165 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_debug.h IDENTIFIER KSTARS_EKOS CATEGORY_NAME org.kde.kstars.ekos)
1166 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_capture_debug.h IDENTIFIER KSTARS_EKOS_CAPTURE CATEGORY_NAME org.kde.kstars.ekos.capture)
1167 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_focus_debug.h IDENTIFIER KSTARS_EKOS_FOCUS CATEGORY_NAME org.kde.kstars.ekos.focus)
1168 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_align_debug.h IDENTIFIER KSTARS_EKOS_ALIGN CATEGORY_NAME org.kde.kstars.ekos.align)
1169 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_guide_debug.h IDENTIFIER KSTARS_EKOS_GUIDE CATEGORY_NAME org.kde.kstars.ekos.guide)
1170 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_mount_debug.h IDENTIFIER KSTARS_EKOS_MOUNT CATEGORY_NAME org.kde.kstars.ekos.mount)
1171 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_scheduler_debug.h IDENTIFIER KSTARS_EKOS_SCHEDULER CATEGORY_NAME org.kde.kstars.ekos.scheduler)
1172 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_analyze_debug.h IDENTIFIER KSTARS_EKOS_ANALYZE CATEGORY_NAME org.kde.kstars.ekos.analyze)
1173 ecm_qt_declare_logging_category(kstars_SRCS HEADER ekos_observatory_debug.h IDENTIFIER KSTARS_EKOS_OBSERVATORY CATEGORY_NAME org.kde.kstars.ekos.observatory)
1174 
1175 ecm_qt_declare_logging_category(kstars_SRCS HEADER catalogsdb_debug.h IDENTIFIER KSTARS_CATALOGS CATEGORY_NAME org.kde.kstars.catalogdb)
1176 
1177 
1178 set( kstars_KCFG_SRCS Options.kcfgc )
1179 
1180 # We cannot generate property up until KF5 Config v5.78.0 or later
1181 if (${KF5_VERSION} VERSION_GREATER_EQUAL "5.78.0")
1182     set(KF5_CONFIG_OK true)
1183     configure_file(
1184         ${CMAKE_CURRENT_SOURCE_DIR}/Options.kcfgc.cmake
1185         ${CMAKE_CURRENT_SOURCE_DIR}/Options.kcfgc
1186     )
1187     kconfig_add_kcfg_files(kstars_SRCS ${kstars_KCFG_SRCS} GENERATE_MOC)
1188     kconfig_add_kcfg_files(kstarslite_SRCS ${kstars_KCFG_SRCS} GENERATE_MOC)
1189 else()
1190     set(KF5_CONFIG_OK false)
1191     configure_file(
1192         ${CMAKE_CURRENT_SOURCE_DIR}/Options.kcfgc.cmake
1193         ${CMAKE_CURRENT_SOURCE_DIR}/Options.kcfgc
1194     )
1195     kconfig_add_kcfg_files(kstars_SRCS ${kstars_KCFG_SRCS})
1196     kconfig_add_kcfg_files(kstarslite_SRCS ${kstars_KCFG_SRCS})
1197 endif()
1198 
1199 ecm_qt_declare_logging_category(kstarslite_SRCS HEADER kstars_debug.h IDENTIFIER KSTARS CATEGORY_NAME org.kde.kstars)
1200 ecm_qt_declare_logging_category(kstarslite_SRCS HEADER fits_debug.h IDENTIFIER KSTARS_FITS CATEGORY_NAME org.kde.kstars.fits)
1201 
1202 IF (UNITY_BUILD)
1203     ENABLE_UNITY_BUILD(kstars kstars_SRCS 10 cpp)
1204     ENABLE_UNITY_BUILD(kstarslite kstarslite_SRCS 10 cpp)
1205 ENDIF ()
1206 
1207 set(kstars_SRCS ${kstars_SRCS} ${fits2_SRCS} ${sep_SRCS} ${gpg_SRCS} ${hough_SRCS} ${hips_manager_SRCS})
1208 set(kstarslite_SRCS ${kstarslite_SRCS} ${fits_klite_SRCS} ${sep_SRCS} ${hough_SRCS} ${fits2_klite_SRCS} ${kstarslite_libtess_SRC})
1209 
1210 IF (NOT ANDROID)
1211     # GSL
1212     find_package(GSL REQUIRED)
1213     qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.xml kstars.h KStars)
1214     qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.SimClock.xml simclock.h SimClock)
1215     qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.FOV.xml fov.h FOV)
1216 
1217     IF (INDI_FOUND)
1218         # INDI
1219         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.INDI.xml indi/indidbus.h INDIDBus)
1220         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.INDI.GenericDevice.xml indi/indistd.h ISD::GenericDevice)
1221         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.INDI.Dome.xml indi/indidome.h ISD::Dome)
1222         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.INDI.Weather.xml indi/indiweather.h ISD::Weather)
1223         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.INDI.DustCap.xml indi/indidustcap.h ISD::DustCap)
1224         # Ekos
1225         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.xml ekos/manager.h Ekos::Manager)
1226         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Capture.xml ekos/capture/capture.h Ekos::Capture)
1227         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Focus.xml ekos/focus/focus.h Ekos::Focus)
1228         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Guide.xml ekos/guide/guide.h Ekos::Guide)
1229         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Align.xml ekos/align/align.h Ekos::Align)
1230         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Mount.xml ekos/mount/mount.h Ekos::Mount)
1231         qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Scheduler.xml ekos/scheduler/scheduler.h Ekos::Scheduler)
1232         # TODO enable back observatory
1233         #qt5_add_dbus_adaptor(kstars_SRCS org.kde.kstars.Ekos.Observatory.xml ekos/observatory/observatory.h Ekos::Observatory)
1234     ENDIF ()
1235 
1236     ki18n_wrap_ui(kstars_SRCS
1237         ${indiui_SRCS}
1238         ${ui_SRCS}
1239         ${fitsui_SRCS}
1240         ${ekosui_SRCS}
1241         ${xplanetui_SRCS}
1242         ${kstars_optionsui_SRCS}
1243         ${kstars_dialogsui_SRCS}
1244         ${printingui_SRCS}
1245         auxiliary/thumbnailpicker.ui
1246         auxiliary/thumbnaileditor.ui
1247         oal/observeradd.ui
1248         oal/equipmentwriter.ui
1249         oal/execute.ui
1250         hips/opships.ui
1251         hips/opshipsdisplay.ui
1252         hips/opshipscache.ui
1253         #skycomponents/notifyupdatesui.ui
1254     )
1255 
1256     add_library(KStarsLib STATIC ${kstars_SRCS}
1257         indi/collimationOptions.ui)
1258 
1259     if (BUILD_PYKSTARS)
1260       set_target_properties(KStarsLib PROPERTIES POSITION_INDEPENDENT_CODE ON)
1261     endif ()
1262 
1263     include(GenerateExportHeader)
1264     generate_export_header(KStarsLib)
1265 
1266     target_link_libraries(KStarsLib
1267         LibKSDataHandlers
1268         htmesh
1269         KF5::Crash
1270         KF5::I18n
1271         KF5::NewStuff
1272         KF5::KIOFileWidgets
1273         KF5::WidgetsAddons
1274         KF5::Plotting
1275         KF5::Notifications
1276         Qt5::Gui
1277         Qt5::PrintSupport
1278         Qt5::Sql
1279         Qt5::Svg
1280         Qt5::Qml
1281         Qt5::Quick
1282         Qt5::Network
1283         #Qt5::Positioning
1284         Qt5::Concurrent
1285         Qt5::WebSockets
1286         ${ZLIB_LIBRARIES}
1287         Eigen3::Eigen
1288         GSL::gsl
1289         )
1290 
1291     if (Qt5Keychain_FOUND)
1292         target_include_directories(KStarsLib PUBLIC ${QTKEYCHAIN_INCLUDE_DIRS})
1293         target_link_libraries(KStarsLib ${QTKEYCHAIN_LIBRARIES})
1294     endif(Qt5Keychain_FOUND)
1295 
1296     if (Qt5DataVisualization_FOUND)
1297         target_link_libraries(KStarsLib Qt5::DataVisualization)
1298     endif(Qt5DataVisualization_FOUND)
1299 
1300     if (KF5NotifyConfig_FOUND)
1301         target_link_libraries(KStarsLib KF5::NotifyConfig)
1302     endif(KF5NotifyConfig_FOUND)
1303 
1304     if(NOT WIN32)
1305         target_link_libraries(KStarsLib m)
1306     endif(NOT WIN32)
1307 ENDIF ()
1308 
1309 if (BUILD_KSTARS_LITE)
1310     add_library(KStarsLiteLib STATIC ${kstarslite_SRCS})
1311     target_link_libraries(KStarsLiteLib
1312         LibKSDataHandlers
1313         htmesh
1314         KF5::I18n
1315         KF5::Plotting
1316         KF5::ConfigGui
1317         Qt5::Gui
1318         Qt5::Sql
1319         Qt5::Qml
1320         Qt5::Quick
1321         Qt5::QuickControls2
1322         Qt5::Positioning
1323         Qt5::PositioningQuick
1324         Qt5::Concurrent
1325         ${ZLIB_LIBRARIES}
1326         )
1327 
1328     if (ANDROID)
1329         target_link_libraries(KStarsLiteLib Qt5::AndroidExtras)
1330     endif ()
1331 
1332 endif ()
1333 
1334 
1335 if (CFITSIO_FOUND)
1336     if (NOT ANDROID)
1337         target_include_directories(KStarsLib PUBLIC ${CFITSIO_INCLUDE_DIR})
1338         target_link_libraries(KStarsLib ${CFITSIO_LIBRARIES})
1339     endif()
1340     if (BUILD_KSTARS_LITE)
1341         target_include_directories(KStarsLiteLib PUBLIC ${CFITSIO_INCLUDE_DIR})
1342         target_link_libraries(KStarsLiteLib ${CFITSIO_LIBRARIES})
1343     endif()
1344 endif(CFITSIO_FOUND)
1345 
1346 if(INDI_FOUND)
1347     if (NOT ANDROID)
1348         find_package(Nova REQUIRED)
1349         include_directories(${NOVA_INCLUDE_DIR})
1350     endif ()
1351 
1352     ## Support Multiple Platforms. All Require INDI
1353     ## WIN32 Desktop: Requires INDI Qt5 Client + GSL
1354     ## WIN32 Lite: Requires INDI Qt5 Client
1355     ## Linux + MacOS Desktop: Requires INDI Client + GSL
1356     ## Linux + MacOS Lite: Requires INDI Qt5 Client
1357     ## Android: Requires INDI Qt5 Client built for Android
1358     if (NOT ANDROID)
1359         target_link_libraries(KStarsLib ${CMAKE_THREAD_LIBS_INIT})
1360         # StellarSolver
1361         target_link_libraries(KStarsLib StellarSolver::stellarsolver)
1362     endif ()
1363 
1364     if(WIN32 OR ANDROID)
1365         if(ANDROID)
1366             target_link_libraries(KStarsLiteLib ${INDI_CLIENT_ANDROID_LIBRARIES} ${CFITSIO_LIBRARIES} ${LIBRAW_LIBRARIES})
1367             target_compile_options(KStarsLiteLib PRIVATE ${KSTARSLITE_CPP_OPTIONS} -DUSE_QT5_INDI -DKSTARS_LITE)
1368         else(ANDROID)
1369             target_link_libraries(KStarsLib ${INDI_CLIENT_LIBRARIES} ${NOVA_LIBRARIES})
1370         endif(ANDROID)
1371     else(WIN32 OR ANDROID)
1372         if (BUILD_KSTARS_LITE)
1373             target_link_libraries(KStarsLiteLib ${INDI_CLIENT_QT_LIBRARIES} ${NOVA_LIBRARIES} z)
1374             target_compile_options(KStarsLiteLib PRIVATE ${KSTARSLITE_CPP_OPTIONS} -DUSE_QT5_INDI -DKSTARS_LITE)
1375         endif(BUILD_KSTARS_LITE)
1376         target_link_libraries(KStarsLib ${INDI_CLIENT_LIBRARIES} ${NOVA_LIBRARIES} z)
1377     endif(WIN32 OR ANDROID)
1378 
1379 endif(INDI_FOUND)
1380 
1381 if(WCSLIB_FOUND)
1382     target_link_libraries(KStarsLib ${WCSLIB_LIBRARIES})
1383     if (BUILD_KSTARS_LITE)
1384         target_link_libraries(KStarsLiteLib ${WCSLIB_LIBRARIES})
1385     endif()
1386 endif (WCSLIB_FOUND)
1387 
1388 if(LibRaw_FOUND)
1389     if (NOT ANDROID)
1390         target_link_libraries(KStarsLib ${LibRaw_LIBRARIES})
1391     endif()
1392     if (BUILD_KSTARS_LITE)
1393         target_link_libraries(KStarsLiteLib ${LibRaw_LIBRARIES})
1394     endif()
1395 endif (LibRaw_FOUND)
1396 
1397 # Link libnova if found
1398 if (NOVA_FOUND)
1399     target_link_libraries(KStarsLib ${NOVA_LIBRARIES})
1400 endif()
1401 
1402 if (LibXISF_FOUND)
1403     target_link_libraries(KStarsLib LibXISF::LibXISF)
1404 endif()
1405 
1406 #FIXME Enable OpenGL Later
1407 #if( OPENGL_FOUND )
1408 #    target_link_libraries(KStarsLib
1409 #    ${OPENGL_LIBRARIES}
1410 #    ${QT_QTOPENGL_LIBRARY}
1411 #    )
1412 #endif( OPENGL_FOUND )
1413 
1414 set (KSTARS_APP_SRCS
1415     main.cpp
1416 )
1417 
1418 # add icon to application sources
1419 ecm_add_app_icon(KSTARS_APP_SRCS ICONS
1420     ${CMAKE_CURRENT_SOURCE_DIR}/icons/16-apps-kstars.png
1421     ${CMAKE_CURRENT_SOURCE_DIR}/icons/32-apps-kstars.png
1422     ${CMAKE_CURRENT_SOURCE_DIR}/icons/48-apps-kstars.png
1423     ${CMAKE_CURRENT_SOURCE_DIR}/icons/64-apps-kstars.png
1424     ${CMAKE_CURRENT_SOURCE_DIR}/icons/128-apps-kstars.png
1425 )
1426 
1427 qt5_add_resources(KSTARS_APP_SRCS data/kstars.qrc)
1428 
1429 if (ANDROID)
1430     add_library(kstars SHARED ${KSTARS_APP_SRCS})
1431     target_compile_options(kstars PRIVATE ${KSTARSLITE_CPP_OPTIONS} -DUSE_QT5_INDI -DKSTARS_LITE)
1432     add_dependencies(KStarsLiteLib cfitsio indi raw)
1433     target_link_libraries(kstars KStarsLiteLib)
1434 else ()
1435     if (BUILD_KSTARS_LITE)
1436         add_executable(kstars_lite ${KSTARS_APP_SRCS})
1437         target_compile_options(kstars_lite PRIVATE ${KSTARSLITE_CPP_OPTIONS} -DUSE_QT5_INDI -DKSTARS_LITE)
1438         target_link_libraries(kstars_lite KStarsLiteLib)
1439     endif()
1440     add_executable(kstars ${KSTARS_APP_SRCS})
1441     target_link_libraries(kstars KStarsLib)
1442 endif ()
1443 
1444 if(APPLE)
1445     if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files)
1446         message(STATUS "Updating KStars Mac Files")
1447         execute_process(COMMAND "git" "pull"
1448             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files")
1449     else(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files)
1450         message(STATUS "Downloading KStars Mac Files")
1451         execute_process(COMMAND "git" "clone" "https://github.com/rlancaste/kstars-mac-files.git"
1452             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
1453     endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files)
1454 
1455     set(KSTARS_APP "${CMAKE_BINARY_DIR}/bin/KStars.app")
1456     execute_process(COMMAND ${CMAKE_COMMAND}
1457                     -DBUNDLED_DATA_LOCATION=${CMAKE_BINARY_DIR}/bin/KStars.app/Contents/Resources
1458                     ${CMAKE_CURRENT_SOURCE_DIR}/data
1459                     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/kstars/data")
1460     execute_process(COMMAND ${CMAKE_COMMAND} --build . --target install
1461                     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/kstars/data")
1462     file(COPY
1463         "${CMAKE_CURRENT_SOURCE_DIR}/data/qml"
1464         DESTINATION "${KSTARS_APP}/Contents/Resources/kstars/")
1465     file(COPY
1466         "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/icons"
1467         DESTINATION "${KSTARS_APP}/Contents/Resources/")
1468     file(COPY
1469         "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/dbus"
1470         DESTINATION "${KSTARS_APP}/Contents/Plugins/")
1471     file(COPY
1472         "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/gsc"
1473         DESTINATION "${KSTARS_APP}/Contents/MacOS/")
1474     file(COPY
1475         "${CMAKE_CURRENT_SOURCE_DIR}/kstars.notifyrc"
1476         DESTINATION "${KSTARS_APP}/Contents/Resources/knotifications5/")
1477     file(COPY
1478         "${CMAKE_CURRENT_SOURCE_DIR}/kstars.kcfg"
1479         DESTINATION "${KSTARS_APP}/Contents/Resources/")
1480 
1481     find_program(DBUS_SEND dbus-send PATHS ${PATHS})
1482     if(NOT DBUS_SEND)
1483         message(WARNING "DBUS Send program not found in Path, DBUS, KStars Scripting, and the Scheduler won't work without it.")
1484     else(NOT DBUS_SEND)
1485         file(COPY
1486             "${DBUS_SEND}"
1487             DESTINATION "${KSTARS_APP}/Contents/MacOS/")
1488     endif(NOT DBUS_SEND)
1489 
1490     find_program(DBUS_DAEMON dbus-daemon PATHS ${PATHS})
1491     if(NOT DBUS_DAEMON)
1492         message(WARNING "DBUS Daemon program not found in Path, DBUS, KStars Scripting, and the Scheduler won't work without it.")
1493     else(NOT DBUS_DAEMON)
1494         file(COPY
1495             "${DBUS_DAEMON}"
1496             DESTINATION "${KSTARS_APP}/Contents/MacOS/")    
1497     endif(NOT DBUS_DAEMON)
1498 
1499     find_program(XPLANET xplanet PATHS ${PATHS})
1500     if(NOT XPLANET)
1501         message(WARNING "X Planet program not found in Path, the XPlanet Solar System Simulator won't work without it.")
1502     else(NOT XPLANET)
1503         file(COPY
1504             "${XPLANET}"
1505             DESTINATION "${KSTARS_APP}/Contents/MacOS/")
1506     endif(NOT XPLANET)
1507 
1508     find_program(INDI_SERVER indiserver PATHS ${PATHS})
1509     if(NOT INDI_SERVER)
1510         message(WARNING "indiserver program and drivers not found, you can't run local indi drivers without it.")
1511     else(NOT INDI_SERVER)
1512         get_filename_component(INDI_DRIVERS_DIR "${INDI_SERVER}" DIRECTORY)
1513         # INDISERVER
1514         file(COPY
1515             "${INDI_SERVER}"
1516             DESTINATION "${KSTARS_APP}/Contents/MacOS/")
1517         # INDI Drivers
1518         file(GLOB INDI_DRIVERS
1519             "${INDI_DRIVERS_DIR}/indi*"
1520           )
1521         list(FILTER INDI_DRIVERS EXCLUDE REGEX "dSYM$")
1522         file(COPY ${INDI_DRIVERS} DESTINATION "${KSTARS_APP}/Contents/MacOS/")
1523         # Driver Support Files (Note: On some installations it is in the install prefix, in others in the /usr/local/lib directory)
1524         if(EXISTS "${CMAKE_INSTALL_PREFIX}/usr/local/lib/indi/DriverSupport")
1525             file(COPY "${CMAKE_INSTALL_PREFIX}/usr/local/lib/indi/DriverSupport" DESTINATION "${KSTARS_APP}/Contents/Resources/")
1526         elseif(EXISTS "/usr/local/lib/indi/DriverSupport")
1527             file(COPY "/usr/local/lib/indi/DriverSupport" DESTINATION "${KSTARS_APP}/Contents/Resources/")
1528         endif(EXISTS "${CMAKE_INSTALL_PREFIX}/usr/local/lib/indi/DriverSupport")
1529         file(GLOB XML_FILES
1530             "${CMAKE_INSTALL_PREFIX}/share/indi/*"
1531           )
1532         file(COPY ${XML_FILES} DESTINATION "${KSTARS_APP}/Contents/Resources/DriverSupport/")
1533         file(COPY "${CMAKE_INSTALL_PREFIX}/lib/indi/MathPlugins" DESTINATION "${KSTARS_APP}/Contents/Resources/")
1534         # GPHOTO Stuff
1535         #execute_process(COMMAND "pkg-config --modversion libgphoto2" OUTPUT_VARIABLE GPHOTO_VERSION)
1536         set(GPHOTO_VERSION "2.5.27")
1537         set(PORT_VERSION "0.12.0")
1538         file(GLOB IOLIBS
1539             "${CMAKE_INSTALL_PREFIX}/lib/libgphoto2_port/${PORT_VERSION}/*"
1540           )
1541         list(FILTER IOLIBS EXCLUDE REGEX "dSYM$")
1542         file(COPY ${IOLIBS} DESTINATION "${KSTARS_APP}/Contents/Resources/DriverSupport/gphoto/IOLIBS/")
1543         file(GLOB CAMLIBS
1544             "${CMAKE_INSTALL_PREFIX}/lib/libgphoto2/${GPHOTO_VERSION}/*"
1545           )
1546         list(FILTER CAMLIBS EXCLUDE REGEX "dSYM$")
1547         file(COPY ${CAMLIBS} DESTINATION "${KSTARS_APP}/Contents/Resources/DriverSupport/gphoto/CAMLIBS/")
1548     endif(NOT INDI_SERVER)
1549 
1550     execute_process(COMMAND "${CMAKE_COMMAND}" "-E" "tar" "xvz" "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/phonon/FrameworksForVLC.zip"
1551         WORKING_DIRECTORY "${KSTARS_APP}/Contents/")
1552     execute_process(COMMAND "${CMAKE_COMMAND}" "-E" "tar" "xvz" "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/phonon/backend.zip"
1553         WORKING_DIRECTORY "${KSTARS_APP}/Contents/Plugins/")
1554     execute_process(COMMAND "${CMAKE_COMMAND}" "-E" "tar" "xvz" "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/phonon/vlc.zip"
1555         WORKING_DIRECTORY "${KSTARS_APP}/Contents/Plugins/")
1556     execute_process(COMMAND "${CMAKE_COMMAND}" "-E" "tar" "xvz" "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/xplanet-data.zip"
1557         WORKING_DIRECTORY "${KSTARS_APP}/Contents/Resources/kstars/")
1558     execute_process(COMMAND "${CMAKE_COMMAND}" "-E" "tar" "xvz" "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/sounds.zip"
1559         WORKING_DIRECTORY "${KSTARS_APP}/Contents/Resources/")
1560     execute_process(COMMAND "${CMAKE_COMMAND}" "-E" "tar" "xvz" "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/locale.zip"
1561         WORKING_DIRECTORY "${KSTARS_APP}/Contents/Resources/")
1562     set(KSTARS_VERSION "${KStars_VERSION_MAJOR}.${KStars_VERSION_MINOR}.${KStars_VERSION_REVISION}")
1563     execute_process(COMMAND date "+%Y" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE THIS-YEAR)
1564     set_target_properties(kstars PROPERTIES
1565         MACOSX_BUNDLE TRUE
1566         MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/kstars-mac-files/macosbundle.plist.in"
1567     )
1568 endif(APPLE)
1569 
1570 if (BUILD_PYKSTARS)
1571   add_subdirectory(python)
1572 endif()
1573 
1574 install(TARGETS kstars ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
1575 
1576 ########### install files ###############
1577 if(NOT APPLE) # The desktop file is not needed on MacOS and the other two are bundled above
1578 install(PROGRAMS org.kde.kstars.desktop DESTINATION ${KDE_INSTALL_APPDIR})
1579 install(FILES kstars.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
1580 install(FILES kstars.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
1581 endif(NOT APPLE)
1582 
1583 if(INDI_FOUND)
1584 #install(FILES ekos/mount/mountbox.qml DESTINATION  ${KDE_INSTALL_DATADIR}/kstars/ekos/mount/qml)
1585 #install(DIRECTORY ekos/mount/ DESTINATION ${KDE_INSTALL_DATADIR}/kstars/ekos/mount/qml
1586 #        FILES_MATCHING PATTERN "*.png")
1587 endif()
1588 
1589 if (NOT ANDROID AND BUILD_KSTARS_LITE)
1590     install(TARGETS kstars_lite ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
1591 endif()