Warning, /utilities/kweather/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # 0002 # SPDX-FileCopyrightText: 2020 Han Young <hanyoung@protonmail.com> 0003 # SPDX-FileCopyrightText: 2020 Devin Lin <espidev@gmail.com> 0004 # 0005 # SPDX-License-Identifier: GPL-2.0-or-later 0006 # 0007 0008 set(kweather_SRCS 0009 main.cpp 0010 weatherlocationlistmodel.cpp 0011 weatherlocationlistmodel.h 0012 weatherlocation.cpp 0013 weatherlocation.h 0014 locationquerymodel.cpp 0015 locationquerymodel.h 0016 temperaturechartdata.cpp 0017 temperaturechartdata.h 0018 formatter.cpp 0019 formatter.h 0020 ) 0021 0022 if (NOT ANDROID) 0023 set(kweather_SRCS 0024 ${kweather_SRCS} 0025 weatherbackground.cpp 0026 weatherbackground.h 0027 ) 0028 endif() 0029 0030 add_library(kweatherLib STATIC) 0031 set_target_properties(kweatherLib PROPERTIES POSITION_INDEPENDENT_CODE ON) 0032 kconfig_add_kcfg_files(kweatherLib kweathersettings.kcfgc GENERATE_MOC) 0033 target_link_libraries(kweatherLib 0034 Qt::Core 0035 KF6::ConfigCore 0036 KF6::ConfigGui 0037 ) 0038 0039 add_executable(kweather ${kweather_SRCS}) 0040 0041 qt_add_qml_module(kweather 0042 URI "org.kde.kweather" 0043 VERSION 1.0 0044 QML_FILES 0045 "qml/Main.qml" 0046 "qml/FlatLocationForecast.qml" 0047 "qml/WeatherDayDelegate.qml" 0048 "qml/WeatherHourDelegate.qml" 0049 "qml/ForecastContainerPage.qml" 0050 "qml/DefaultPage.qml" 0051 "qml/SetupWizard.qml" 0052 "qml/AboutPage.qml" 0053 "qml/TemperatureChartCard.qml" 0054 "qml/SunriseCard.qml" 0055 "qml/InfoCard.qml" 0056 "qml/WeatherStrip.qml" 0057 "qml/DynamicForecastPage.qml" 0058 "qml/FlatForecastPage.qml" 0059 SOURCES 0060 weatherlocationlistmodel.cpp 0061 weatherlocationlistmodel.h 0062 ) 0063 0064 qt_add_qml_module(kweatherbackgrounds 0065 URI "org.kde.kweather.backgrounds" 0066 VERSION 1.0 0067 QML_FILES 0068 "qml/backgrounds/DynamicBackground.qml" 0069 "qml/backgrounds/ClearDay.qml" 0070 "qml/backgrounds/ClearNight.qml" 0071 "qml/backgrounds/CloudyDay.qml" 0072 "qml/backgrounds/CloudyNight.qml" 0073 "qml/backgrounds/Misty.qml" 0074 "qml/backgrounds/PartlyCloudyDay.qml" 0075 "qml/backgrounds/PartlyCloudyNight.qml" 0076 "qml/backgrounds/RainyDay.qml" 0077 "qml/backgrounds/RainyNight.qml" 0078 "qml/backgrounds/SnowyDay.qml" 0079 "qml/backgrounds/SnowyNight.qml" 0080 STATIC 0081 ) 0082 0083 qt_add_qml_module(kweatherbackgroundscomponents 0084 URI "org.kde.kweather.backgrounds.components" 0085 VERSION 1.0 0086 QML_FILES 0087 "qml/backgrounds/components/Sun.qml" 0088 "qml/backgrounds/components/Stars.qml" 0089 "qml/backgrounds/components/Snow.qml" 0090 "qml/backgrounds/components/Rain.qml" 0091 "qml/backgrounds/components/Cloud.qml" 0092 "qml/backgrounds/components/Cloudy.qml" 0093 STATIC 0094 ) 0095 0096 qt_add_qml_module(kweathercomponents 0097 URI "org.kde.kweather.components" 0098 VERSION 1.0 0099 QML_FILES 0100 "qml/components/ListDelegate.qml" 0101 STATIC 0102 ) 0103 0104 qt_add_qml_module(kweatherlocations 0105 URI "org.kde.kweather.locations" 0106 VERSION 1.0 0107 QML_FILES 0108 "qml/locationslist/LocationsListView.qml" 0109 "qml/locationslist/LocationsListPage.qml" 0110 "qml/locationslist/LocationsListDialog.qml" 0111 "qml/locationslist/AddLocationDialog.qml" 0112 "qml/locationslist/AddLocationListView.qml" 0113 "qml/locationslist/AddLocationPage.qml" 0114 STATIC 0115 ) 0116 0117 qt_add_qml_module(kweathersettings 0118 URI "org.kde.kweather.settings" 0119 VERSION 1.0 0120 QML_FILES 0121 "qml/settings/SettingsPage.qml" 0122 "qml/settings/SettingsComponent.qml" 0123 "qml/settings/SettingsDialog.qml" 0124 "qml/settings/SettingsWindow.qml" 0125 STATIC 0126 ) 0127 0128 target_link_libraries(kweather 0129 PUBLIC 0130 Qt6::Qml 0131 Qt6::QuickControls2 0132 Qt6::Network 0133 Qt6::Charts 0134 Qt6::OpenGL 0135 KF6::I18n 0136 KF6::CoreAddons 0137 KF6::Notifications 0138 KWeatherCore 0139 kweatherLib 0140 kweatherbackgroundsplugin 0141 kweatherbackgroundscomponentsplugin 0142 kweathercomponentsplugin 0143 kweatherlocationsplugin 0144 kweathersettingsplugin 0145 ) 0146 0147 add_subdirectory(resources) 0148 0149 if (ANDROID) 0150 target_link_libraries(kweather 0151 PUBLIC 0152 OpenSSL::SSL 0153 Qt6::Svg 0154 Qt6::GuiPrivate 0155 Qt6::Qml 0156 Qt6::Quick 0157 ) 0158 0159 kirigami_package_breeze_icons(ICONS 0160 raindrop 0161 globe 0162 settings-configure 0163 network-disconnect 0164 search 0165 list-add 0166 delete 0167 arrow-right 0168 speedometer 0169 go-up 0170 go-down 0171 go-right 0172 compass 0173 mark-location 0174 find-location 0175 0176 weather-clear 0177 weather-clear-night 0178 weather-clear-wind 0179 weather-clear-wind-night 0180 weather-clouds 0181 weather-clouds-night 0182 weather-clouds-wind 0183 weather-clouds-wind-night 0184 weather-few-clouds 0185 weather-few-clouds-night 0186 weather-few-clouds-wind 0187 weather-few-clouds-wind-night 0188 weather-fog 0189 weather-freezing-rain 0190 weather-hail 0191 weather-many-clouds 0192 weather-many-clouds-wind 0193 weather-mist 0194 weather-none-available 0195 weather-overcast 0196 weather-overcast-wind 0197 weather-showers 0198 weather-showers-day 0199 weather-showers-night 0200 weather-showers-scattered 0201 weather-showers-scattered-day 0202 weather-showers-scattered-night 0203 weather-snow 0204 weather-snow-rain 0205 weather-snow-scattered 0206 weather-snow-scattered-day 0207 weather-snow-scattered-night 0208 weather-storm 0209 weather-storm-day 0210 weather-storm-night 0211 ) 0212 0213 ecm_add_android_apk(kweather ANDROID_DIR ${CMAKE_SOURCE_DIR}/android) 0214 else() 0215 target_link_libraries(kweather PUBLIC Qt6::Widgets) 0216 endif() 0217 0218 if (UNIX AND (NOT ANDROID)) 0219 add_subdirectory(plasmoid) 0220 endif() 0221 target_include_directories(kweather PRIVATE ${CMAKE_BINARY_DIR}) 0222 install(TARGETS kweather ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})