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     weatherlocation.cpp
0012     locationquerymodel.cpp
0013     temperaturechartdata.cpp
0014     formatter.cpp
0015 )
0016 
0017 if (NOT ANDROID)
0018     set(kweather_SRCS
0019         ${kweather_SRCS}
0020         weatherbackground.cpp
0021     )
0022 endif()
0023 
0024 add_library(kweatherLib STATIC)
0025 set_target_properties(kweatherLib PROPERTIES POSITION_INDEPENDENT_CODE ON)
0026 kconfig_add_kcfg_files(kweatherLib kweathersettings.kcfgc GENERATE_MOC)
0027 target_link_libraries(kweatherLib
0028     Qt::Core
0029     KF${QT_MAJOR_VERSION}::ConfigCore
0030     KF${QT_MAJOR_VERSION}::ConfigGui
0031     )
0032 if (QT_MAJOR_VERSION EQUAL "5")
0033     qtquick_compiler_add_resources(RESOURCES resources.qrc)
0034 else()
0035     qt_add_resources(RESOURCES resources.qrc)
0036 endif()
0037 
0038 add_executable(kweather ${kweather_SRCS} ${RESOURCES})
0039 target_link_libraries(kweather
0040     PUBLIC
0041     Qt::Qml
0042     Qt::QuickControls2
0043     Qt::Network
0044     Qt::Charts
0045     KF${QT_MAJOR_VERSION}::I18n
0046     KF${QT_MAJOR_VERSION}::CoreAddons
0047     KF${QT_MAJOR_VERSION}::Notifications
0048     KF${QT_MAJOR_VERSION}::KWeatherCore
0049     kweatherLib
0050 )
0051 if(${QT_MAJOR_VERSION} EQUAL "6")
0052     target_link_libraries(kweather PRIVATE "Qt${QT_MAJOR_VERSION}::OpenGL")
0053 endif()
0054 if (ANDROID)
0055     target_link_libraries(kweather
0056         PUBLIC
0057         OpenSSL::SSL
0058         Qt::Svg
0059         Qt${QT_MAJOR_VERSION}::GuiPrivate
0060         Qt${QT_MAJOR_VERSION}::Qml
0061         Qt${QT_MAJOR_VERSION}::Quick
0062     )
0063 
0064     kirigami_package_breeze_icons(ICONS
0065         raindrop
0066         globe
0067         settings-configure
0068         network-disconnect
0069         search
0070         list-add
0071         delete
0072         arrow-right
0073         speedometer
0074         go-up
0075         go-down
0076         go-right
0077         compass
0078         mark-location
0079         find-location
0080 
0081         weather-clear
0082         weather-clear-night
0083         weather-clear-wind
0084         weather-clear-wind-night
0085         weather-clouds
0086         weather-clouds-night
0087         weather-clouds-wind
0088         weather-clouds-wind-night
0089         weather-few-clouds
0090         weather-few-clouds-night
0091         weather-few-clouds-wind
0092         weather-few-clouds-wind-night
0093         weather-fog
0094         weather-freezing-rain
0095         weather-hail
0096         weather-many-clouds
0097         weather-many-clouds-wind
0098         weather-mist
0099         weather-none-available
0100         weather-overcast
0101         weather-overcast-wind
0102         weather-showers
0103         weather-showers-day
0104         weather-showers-night
0105         weather-showers-scattered
0106         weather-showers-scattered-day
0107         weather-showers-scattered-night
0108         weather-snow
0109         weather-snow-rain
0110         weather-snow-scattered
0111         weather-snow-scattered-day
0112         weather-snow-scattered-night
0113         weather-storm
0114         weather-storm-day
0115         weather-storm-night
0116     )
0117 else()
0118     target_link_libraries(kweather PUBLIC Qt::Widgets)
0119 endif()
0120 
0121 if (UNIX AND (NOT ANDROID))
0122 add_subdirectory(plasmoid)
0123 endif()
0124 target_include_directories(kweather PRIVATE ${CMAKE_BINARY_DIR})
0125 install(TARGETS kweather ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})