From 92237fccb0a3262ccab560a74935ca50b0e09fad Mon Sep 17 00:00:00 2001 From: Georg Zotti Date: Wed, 28 Aug 2024 13:34:20 +0200 Subject: [PATCH] Satellite plugin: ... and remove a requirement for Qt5 build --- plugins/Satellites/src/CMakeLists.txt | 14 +++++++------- plugins/Satellites/src/Satellites.cpp | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/Satellites/src/CMakeLists.txt b/plugins/Satellites/src/CMakeLists.txt index 1938a4d774ba1..218a1d10ace52 100644 --- a/plugins/Satellites/src/CMakeLists.txt +++ b/plugins/Satellites/src/CMakeLists.txt @@ -65,14 +65,14 @@ IF(ENABLE_TESTING) ENDIF(ENABLE_TESTING) ADD_LIBRARY(Satellites-static STATIC ${Satellites_SRCS} ${Satellites_RES_CXX} ${SatellitesDialog_UIS_H}) +TARGET_LINK_LIBRARIES(Satellites-static Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Widgets + Qt${QT_VERSION_MAJOR}::GuiPrivate) IF(ENABLE_XLSX AND (${SATELLITES_PLUGIN_IRIDIUM} EQUAL "1")) - TARGET_LINK_LIBRARIES(Satellites-static Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Concurrent - Qt${QT_VERSION_MAJOR}::GuiPrivate QXlsx::QXlsx) -ELSE() - TARGET_LINK_LIBRARIES(Satellites-static Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Concurrent - Qt${QT_VERSION_MAJOR}::GuiPrivate) + TARGET_LINK_LIBRARIES(Satellites-static QXlsx::QXlsx) +ENDIF() +IF (${QT_VERSION_MAJOR} EQUAL "6") + TARGET_LINK_LIBRARIES(Satellites-static Qt${QT_VERSION_MAJOR}::Concurrent) ENDIF() # The library target "Satellites-static" has a default OUTPUT_NAME of "Satellites-static", so change it. SET_TARGET_PROPERTIES(Satellites-static PROPERTIES OUTPUT_NAME "Satellites") diff --git a/plugins/Satellites/src/Satellites.cpp b/plugins/Satellites/src/Satellites.cpp index 85d4f591dc7ba..79b125408f9f2 100644 --- a/plugins/Satellites/src/Satellites.cpp +++ b/plugins/Satellites/src/Satellites.cpp @@ -60,7 +60,9 @@ #include #include #include +#if (QT_VERSION>=QT_VERSION_CHECK(6,0,0)) #include +#endif StelModule* SatellitesStelPluginInterface::getStelModule() const {