Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Discover
Commits
c93d0eed
Commit
c93d0eed
authored
Jan 30, 2021
by
Nicolas Fella
Browse files
Use versionless Qt cmake target
This makes it easier to build against both Qt5 and Qt6 GIT_SILENT
parent
a5c014df
Changes
14
Hide whitespace changes
Inline
Side-by-side
discover/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -35,8 +35,8 @@ target_link_libraries(plasma-discover PUBLIC
KF5::ItemModels
KF5::KIOWidgets
KF5::QuickAddons
Qt
5
::Quick
Qt
5
::X11Extras
Qt::Quick
Qt::X11Extras
Discover::Common
)
...
...
discover/autotests/CMakeLists.txt
View file @
c93d0eed
set
(
plasma_discover_autotest_SRCS
)
ecm_qt_declare_logging_category
(
plasma_discover_autotest_SRCS HEADER discover_debug.h IDENTIFIER DISCOVER_LOG CATEGORY_NAME org.kde.plasma.discover
)
ecm_add_test
(
PaginateModelTest.cpp ../PaginateModel.cpp
${
plasma_discover_autotest_SRCS
}
TEST_NAME PaginateModelTest LINK_LIBRARIES Qt
5
::Test
)
ecm_add_test
(
PaginateModelTest.cpp ../PaginateModel.cpp
${
plasma_discover_autotest_SRCS
}
TEST_NAME PaginateModelTest LINK_LIBRARIES Qt::Test
)
target_include_directories
(
PaginateModelTest PUBLIC
${
CMAKE_SOURCE_DIR
}
/libdiscover/
)
if
(
BUILD_DummyBackend
)
...
...
libdiscover/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -64,13 +64,13 @@ endif()
target_link_libraries
(
DiscoverCommon
PUBLIC
Qt
5
::Core
Qt
5
::Qml
Qt
5
::Widgets
Qt::Core
Qt::Qml
Qt::Widgets
KF5::I18n
KF5::ItemModels
PRIVATE
Qt
5
::Xml
Qt::Xml
KF5::CoreAddons
KF5::KIOWidgets
# KIO/AccessManager
)
...
...
libdiscover/backends/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -5,7 +5,7 @@ function(add_unit_test name)
target_link_libraries
(
${
name
}
Discover::Common
Qt
5
::Test Qt
5
::Core
${
EXTRA_LIBS
}
)
Qt::Test Qt::Core
${
EXTRA_LIBS
}
)
endfunction
()
if
(
KF5Attica_FOUND AND KF5NewStuff_FOUND
)
...
...
libdiscover/backends/DummyBackend/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -9,7 +9,7 @@ set(dummy-backend_SRCS
)
add_library
(
dummy-backend MODULE
${
dummy-backend_SRCS
}
)
target_link_libraries
(
dummy-backend Qt
5
::Core Qt
5
::Widgets KF5::CoreAddons KF5::ConfigCore Discover::Common
)
target_link_libraries
(
dummy-backend Qt::Core Qt::Widgets KF5::CoreAddons KF5::ConfigCore Discover::Common
)
install
(
TARGETS dummy-backend DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/discover
)
install
(
FILES dummy-backend-categories.xml DESTINATION
${
DATA_INSTALL_DIR
}
/libdiscover/categories
)
...
...
libdiscover/backends/FlatpakBackend/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -10,7 +10,7 @@ set(flatpak-backend_SRCS
)
add_library
(
flatpak-backend MODULE
${
flatpak-backend_SRCS
}
)
target_link_libraries
(
flatpak-backend Qt
5
::Core Qt
5
::Widgets Qt
5
::Concurrent KF5::CoreAddons KF5::ConfigCore Discover::Common AppStreamQt PkgConfig::Flatpak
)
target_link_libraries
(
flatpak-backend Qt::Core Qt::Widgets Qt::Concurrent KF5::CoreAddons KF5::ConfigCore Discover::Common AppStreamQt PkgConfig::Flatpak
)
if
(
NOT Flatpak_VERSION VERSION_LESS 1.1.2
)
target_compile_definitions
(
flatpak-backend PRIVATE -DFLATPAK_VERBOSE_PROGRESS -DFLATPAK_LIST_UNUSED_REFS
)
...
...
@@ -20,7 +20,7 @@ install(TARGETS flatpak-backend DESTINATION ${KDE_INSTALL_PLUGINDIR}/discover)
install
(
FILES flatpak-backend-categories.xml DESTINATION
${
DATA_INSTALL_DIR
}
/libdiscover/categories
)
add_library
(
FlatpakNotifier MODULE FlatpakNotifier.cpp
)
target_link_libraries
(
FlatpakNotifier Discover::Notifiers Qt
5
::Concurrent PkgConfig::Flatpak
)
target_link_libraries
(
FlatpakNotifier Discover::Notifiers Qt::Concurrent PkgConfig::Flatpak
)
set_target_properties
(
FlatpakNotifier PROPERTIES INSTALL_RPATH
${
CMAKE_INSTALL_FULL_LIBDIR
}
/plasma-discover
)
install
(
TARGETS FlatpakNotifier DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/discover-notifier
)
...
...
libdiscover/backends/FwupdBackend/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -8,7 +8,7 @@ set(fwupd-backend_SRCS
)
add_library
(
fwupd-backend MODULE
${
fwupd-backend_SRCS
}
)
target_link_libraries
(
fwupd-backend Qt
5
::Core KF5::CoreAddons KF5::ConfigCore Discover::Common PkgConfig::Fwupd
)
target_link_libraries
(
fwupd-backend Qt::Core KF5::CoreAddons KF5::ConfigCore Discover::Common PkgConfig::Fwupd
)
install
(
TARGETS fwupd-backend DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/discover
)
libdiscover/backends/KNSBackend/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -5,7 +5,7 @@ add_library(kns-backend MODULE
KNSResource.cpp
KNSReviews.cpp
)
target_link_libraries
(
kns-backend Discover::Common KF5::ConfigCore KF5::Attica KF5::NewStuffCore KF5::WidgetsAddons Qt
5
::Xml
)
target_link_libraries
(
kns-backend Discover::Common KF5::ConfigCore KF5::Attica KF5::NewStuffCore KF5::WidgetsAddons Qt::Xml
)
install
(
TARGETS kns-backend DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/discover
)
install
(
FILES custom/discover_ktexteditor_codesnippets_core.knsrc DESTINATION
${
KDE_INSTALL_KNSRCDIR
}
)
libdiscover/backends/KNSBackend/tests/CMakeLists.txt
View file @
c93d0eed
include_directories
(
..
)
ecm_add_test
(
KNSBackendTest.cpp TEST_NAME knsbackendtest LINK_LIBRARIES Discover::Common Qt
5
::Core Qt
5
::Test KF5::Attica KF5::NewStuff
)
ecm_add_test
(
KNSBackendTest.cpp TEST_NAME knsbackendtest LINK_LIBRARIES Discover::Common Qt::Core Qt::Test KF5::Attica KF5::NewStuff
)
libdiscover/backends/PackageKitBackend/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -19,7 +19,7 @@ ecm_qt_declare_logging_category(packagekit-backend_SRCS HEADER libdiscover_backe
add_library
(
packagekit-backend MODULE
${
packagekit-backend_SRCS
}
)
target_link_libraries
(
packagekit-backend PRIVATE Discover::Common Qt
5
::Core PK::packagekitqt5 KF5::ConfigGui KF5::KIOCore KF5::Archive AppStreamQt
)
target_link_libraries
(
packagekit-backend PRIVATE Discover::Common Qt::Core PK::packagekitqt5 KF5::ConfigGui KF5::KIOCore KF5::Archive AppStreamQt
)
install
(
TARGETS packagekit-backend DESTINATION
${
KDE_INSTALL_PLUGINDIR
}
/discover
)
if
(
TARGET PkgConfig::Markdown
)
...
...
libdiscover/backends/SnapBackend/CMakeLists.txt
View file @
c93d0eed
add_subdirectory
(
libsnapclient
)
add_library
(
snap-backend MODULE SnapResource.cpp SnapBackend.cpp SnapTransaction.cpp snapui.qrc
)
target_link_libraries
(
snap-backend Qt
5
::Core Qt
5
::Concurrent KF5::CoreAddons KF5::ConfigCore Discover::Common Snapd::Core
)
target_link_libraries
(
snap-backend Qt::Core Qt::Concurrent KF5::CoreAddons KF5::ConfigCore Discover::Common Snapd::Core
)
if
(
"
${
Snapd_VERSION
}
"
VERSION_GREATER 1.40
)
target_compile_definitions
(
snap-backend PRIVATE -DSNAP_COMMON_IDS -DSNAP_CHANNELS
)
...
...
libdiscover/backends/SnapBackend/libsnapclient/CMakeLists.txt
View file @
c93d0eed
...
...
@@ -2,11 +2,11 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-paths.h.cmake ${CMAKE_CURRENT_
ki18n_wrap_ui
(
SnapMacaroonDialog_SRCS SnapMacaroonDialog.ui
)
add_executable
(
SnapMacaroonDialog SnapMacaroonDialog.cpp
${
SnapMacaroonDialog_SRCS
}
)
target_link_libraries
(
SnapMacaroonDialog Qt
5
::Network Qt
5
::Widgets KF5::AuthCore KF5::I18n
)
target_link_libraries
(
SnapMacaroonDialog Qt::Network Qt::Widgets KF5::AuthCore KF5::I18n
)
install
(
TARGETS SnapMacaroonDialog DESTINATION
${
KDE_INSTALL_LIBEXECDIR
}
/discover
)
add_executable
(
libsnap_helper SnapAuthHelper.cpp
)
target_link_libraries
(
libsnap_helper Qt
5
::Network KF5::AuthCore Snapd::Core
)
target_link_libraries
(
libsnap_helper Qt::Network KF5::AuthCore Snapd::Core
)
install
(
TARGETS libsnap_helper DESTINATION
${
KAUTH_HELPER_INSTALL_DIR
}
)
kauth_install_actions
(
org.kde.discover.libsnapclient org.kde.discover.libsnapclient.actions
)
...
...
libdiscover/notifiers/CMakeLists.txt
View file @
c93d0eed
add_library
(
DiscoverNotifiers BackendNotifierModule.cpp
)
target_link_libraries
(
DiscoverNotifiers
PUBLIC
Qt
5
::Core
Qt::Core
)
generate_export_header
(
DiscoverNotifiers
)
...
...
libdiscover/tests/CMakeLists.txt
View file @
c93d0eed
ecm_add_test
(
CategoriesTest.cpp TEST_NAME CategoriesTest LINK_LIBRARIES Qt
5
::Test Qt
5
::Gui Discover::Common
)
ecm_add_test
(
CategoriesTest.cpp TEST_NAME CategoriesTest LINK_LIBRARIES Qt::Test Qt::Gui Discover::Common
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment