mirror of
https://github.com/KDE/kasts.git
synced 2025-01-05 13:07:07 +01:00
Modernize cmake
This commit is contained in:
parent
866d111049
commit
6fb08350cb
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
add_subdirectory(kmediasession)
|
add_subdirectory(kmediasession)
|
||||||
|
|
||||||
set(kasts_srcs
|
add_executable(kasts
|
||||||
main.cpp
|
main.cpp
|
||||||
fetcher.cpp
|
fetcher.cpp
|
||||||
database.cpp
|
database.cpp
|
||||||
@ -55,84 +55,84 @@ set(kasts_srcs
|
|||||||
resources.qrc
|
resources.qrc
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "audiologging.h"
|
HEADER "audiologging.h"
|
||||||
IDENTIFIER "kastsAudio"
|
IDENTIFIER "kastsAudio"
|
||||||
CATEGORY_NAME "org.kde.kasts.audio"
|
CATEGORY_NAME "org.kde.kasts.audio"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "datamanagerlogging.h"
|
HEADER "datamanagerlogging.h"
|
||||||
IDENTIFIER "kastsDataManager"
|
IDENTIFIER "kastsDataManager"
|
||||||
CATEGORY_NAME "org.kde.kasts.datamanager"
|
CATEGORY_NAME "org.kde.kasts.datamanager"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "enclosurelogging.h"
|
HEADER "enclosurelogging.h"
|
||||||
IDENTIFIER "kastsEnclosure"
|
IDENTIFIER "kastsEnclosure"
|
||||||
CATEGORY_NAME "org.kde.kasts.enclosure"
|
CATEGORY_NAME "org.kde.kasts.enclosure"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "entrylogging.h"
|
HEADER "entrylogging.h"
|
||||||
IDENTIFIER "kastsEntry"
|
IDENTIFIER "kastsEntry"
|
||||||
CATEGORY_NAME "org.kde.kasts.entry"
|
CATEGORY_NAME "org.kde.kasts.entry"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "feedlogging.h"
|
HEADER "feedlogging.h"
|
||||||
IDENTIFIER "kastsFeed"
|
IDENTIFIER "kastsFeed"
|
||||||
CATEGORY_NAME "org.kde.kasts.feed"
|
CATEGORY_NAME "org.kde.kasts.feed"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "fetcherlogging.h"
|
HEADER "fetcherlogging.h"
|
||||||
IDENTIFIER "kastsFetcher"
|
IDENTIFIER "kastsFetcher"
|
||||||
CATEGORY_NAME "org.kde.kasts.fetcher"
|
CATEGORY_NAME "org.kde.kasts.fetcher"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "synclogging.h"
|
HEADER "synclogging.h"
|
||||||
IDENTIFIER "kastsSync"
|
IDENTIFIER "kastsSync"
|
||||||
CATEGORY_NAME "org.kde.kasts.sync"
|
CATEGORY_NAME "org.kde.kasts.sync"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "models/downloadmodellogging.h"
|
HEADER "models/downloadmodellogging.h"
|
||||||
IDENTIFIER "kastsDownloadModel"
|
IDENTIFIER "kastsDownloadModel"
|
||||||
CATEGORY_NAME "org.kde.kasts.downloadmodel"
|
CATEGORY_NAME "org.kde.kasts.downloadmodel"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "models/queuemodellogging.h"
|
HEADER "models/queuemodellogging.h"
|
||||||
IDENTIFIER "kastsQueueModel"
|
IDENTIFIER "kastsQueueModel"
|
||||||
CATEGORY_NAME "org.kde.kasts.queuemodel"
|
CATEGORY_NAME "org.kde.kasts.queuemodel"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "storagemanagerlogging.h"
|
HEADER "storagemanagerlogging.h"
|
||||||
IDENTIFIER "kastsStorageManager"
|
IDENTIFIER "kastsStorageManager"
|
||||||
CATEGORY_NAME "org.kde.kasts.storagemanager"
|
CATEGORY_NAME "org.kde.kasts.storagemanager"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "storagemovejoblogging.h"
|
HEADER "storagemovejoblogging.h"
|
||||||
IDENTIFIER "kastsStorageMoveJob"
|
IDENTIFIER "kastsStorageMoveJob"
|
||||||
CATEGORY_NAME "org.kde.kasts.storagemovejob"
|
CATEGORY_NAME "org.kde.kasts.storagemovejob"
|
||||||
DEFAULT_SEVERITY Info
|
DEFAULT_SEVERITY Info
|
||||||
)
|
)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kasts_srcs
|
ecm_qt_declare_logging_category(kasts
|
||||||
HEADER "networkconnectionmanagerlogging.h"
|
HEADER "networkconnectionmanagerlogging.h"
|
||||||
IDENTIFIER "kastsNetworkConnectionManager"
|
IDENTIFIER "kastsNetworkConnectionManager"
|
||||||
CATEGORY_NAME "org.kde.kasts.networkconnectionmanager"
|
CATEGORY_NAME "org.kde.kasts.networkconnectionmanager"
|
||||||
@ -140,19 +140,16 @@ ecm_qt_declare_logging_category(kasts_srcs
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
list(APPEND kasts_srcs
|
target_sources(kasts PRIVATE utils/androidlogging.h)
|
||||||
utils/androidlogging.h)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KASTS_FLATPAK)
|
if(KASTS_FLATPAK)
|
||||||
list(APPEND kasts_srcs
|
target_sources(kasts PRIVATE resources-flatpak.qrc)
|
||||||
resources-flatpak.qrc)
|
|
||||||
else()
|
else()
|
||||||
list(APPEND kasts_srcs
|
target_sources(kasts PRIVATE resources-non-flatpak.qrc)
|
||||||
resources-non-flatpak.qrc)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(kasts_ICONS_PNG
|
ecm_add_app_icon(kasts ICONS ${kasts_ICONS_PNG}
|
||||||
../icons/16-apps-kasts.png
|
../icons/16-apps-kasts.png
|
||||||
../icons/24-apps-kasts.png
|
../icons/24-apps-kasts.png
|
||||||
../icons/32-apps-kasts.png
|
../icons/32-apps-kasts.png
|
||||||
@ -161,11 +158,6 @@ set(kasts_ICONS_PNG
|
|||||||
../icons/128-apps-kasts.png
|
../icons/128-apps-kasts.png
|
||||||
)
|
)
|
||||||
|
|
||||||
# add icons to application sources, to have them bundled
|
|
||||||
ecm_add_app_icon(kasts_srcs ICONS ${kasts_ICONS_PNG})
|
|
||||||
|
|
||||||
add_executable(kasts ${kasts_srcs})
|
|
||||||
|
|
||||||
kconfig_add_kcfg_files(kasts settingsmanager.kcfgc GENERATE_MOC)
|
kconfig_add_kcfg_files(kasts settingsmanager.kcfgc GENERATE_MOC)
|
||||||
|
|
||||||
target_include_directories(kasts PRIVATE ${CMAKE_BINARY_DIR})
|
target_include_directories(kasts PRIVATE ${CMAKE_BINARY_DIR})
|
||||||
|
Loading…
Reference in New Issue
Block a user