-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[kf5guiaddons] fix Wayland scanner not being found by transitive deps; fix static builds #19203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BillyONeal
merged 23 commits into
microsoft:master
from
wrobelda:kf5guiaddons_fix_cmake
Aug 30, 2021
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fdae73a
[kf5guiaddons] add QtWaylandScanner_EXECUTABLE variable to Config.cmake
wrobelda a147bdf
[kf5guiaddons] update versions
wrobelda 2661260
[kf5guiaddons] remove extraneous options
wrobelda 8e3bac0
[kf5guiaddons] update versions
wrobelda 1d4b344
[kf5guiaddons] remove extraneous lines, bump version
wrobelda 0105a39
[kf5guiaddons] update versions
wrobelda c51b14d
[kf5guiaddons] add QtWaylandScanner_EXECUTABLE to MAYBE_UNUSED_VARIABLES
wrobelda cec7217
[kf5guiaddons] update versions
wrobelda a7db4b2
[kf5guiaddons] replace CURRENT_INSTALLED_DIR without affecting other …
wrobelda bdcd714
[kf5guiaddons] update deprecated functions
wrobelda 3172255
[kf5guiaddons] wrap paths in quotes
wrobelda 69ed879
[kf5guiaddons] update versions
wrobelda c82701e
[kf5guiaddons] use PACKAGE_PREFIX relative path instead CURRENT_PACKA…
wrobelda f1536e5
[kf5guiaddons] update versions
wrobelda 115400b
[kf5guiaddons] cache the QtWaylandScanner_EXECUTABLE variable
wrobelda e166558
[kf5guiaddons] update versions
wrobelda eb01d6c
[kf5guiaddons] update versions
wrobelda b3da805
[kf5guiaddons] Add missing static dependency
wrobelda 0ffc0c9
[kf5guiaddons] update versions
wrobelda 329f4b3
[kf5guiaddons] rename patch file
wrobelda a643d0b
[kf5guiaddons] update versions
wrobelda 446ddb8
[kf5guiaddons] add PACKAGE_NAME to vcpkg_cmake_config_fixup
wrobelda 8904d69
[kf5guiaddons] update versions
wrobelda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| From 7b0a5566acbdb6ff8e7eca3e5e75aacbf2abff9f Mon Sep 17 00:00:00 2001 | ||
| From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= <me@dawidwrobel.com> | ||
| Date: Sat, 28 Aug 2021 17:08:46 +0200 | ||
| Subject: [PATCH] Add missing static dependency to Config.cmake.in | ||
|
|
||
| - move find_package(Qt5X11Extras) to root CMakeLists.txt | ||
| --- | ||
| CMakeLists.txt | 5 +++++ | ||
| KF5GuiAddonsConfig.cmake.in | 5 ++++- | ||
| src/CMakeLists.txt | 24 ++++++++++-------------- | ||
| 3 files changed, 19 insertions(+), 15 deletions(-) | ||
|
|
||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 337122e..80633e5 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -39,6 +39,11 @@ if (NOT APPLE AND NOT WIN32) | ||
| find_package(XCB MODULE COMPONENTS XCB) | ||
| endif() | ||
|
|
||
| +set(WITH_XCB) | ||
| +if (NOT APPLE AND X11_FOUND AND X11_Xkb_FOUND AND XCB_XCB_FOUND) | ||
| + find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} NO_MODULE) | ||
| +endif() | ||
| + | ||
| if (WITH_WAYLAND) | ||
| find_package(Qt5WaylandClient ${REQUIRED_QT_VERSION} NO_MODULE) | ||
| find_package(QtWaylandScanner REQUIRED) | ||
| diff --git a/KF5GuiAddonsConfig.cmake.in b/KF5GuiAddonsConfig.cmake.in | ||
| index a3c3e58..ae17f6b 100644 | ||
| --- a/KF5GuiAddonsConfig.cmake.in | ||
| +++ b/KF5GuiAddonsConfig.cmake.in | ||
| @@ -6,9 +6,12 @@ include(CMakeFindDependencyMacro) | ||
| find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) | ||
|
|
||
| if (NOT @BUILD_SHARED_LIBS@) | ||
| + if (@Qt5X11Extras_FOUND@) | ||
| + find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@) | ||
| + endif() | ||
| if (@WITH_WAYLAND@) | ||
| find_dependency(Wayland REQUIRED Client) | ||
| - find_dependency(Qt5WaylandClient) | ||
| + find_dependency(Qt5WaylandClient @REQUIRED_QT_VERSION@) | ||
| find_dependency(QtWaylandScanner) | ||
| endif() | ||
| endif() | ||
| diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
| index 1dd66e8..ae0e0aa 100644 | ||
| --- a/src/CMakeLists.txt | ||
| +++ b/src/CMakeLists.txt | ||
| @@ -58,20 +58,16 @@ target_include_directories(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:${KDE_INS | ||
| target_compile_definitions(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:KGUIADDONS_LIB>") | ||
| target_link_libraries(KF5GuiAddons PUBLIC Qt5::Gui) | ||
|
|
||
| -set(WITH_XCB) | ||
| -if (NOT APPLE AND X11_FOUND AND X11_Xkb_FOUND AND XCB_XCB_FOUND) | ||
| - find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} NO_MODULE) | ||
| - if (Qt5X11Extras_FOUND) | ||
| - add_library(kmodifierkey_xcb MODULE util/kmodifierkeyinfoprovider_xcb.cpp) | ||
| - target_include_directories (kmodifierkey_xcb PRIVATE | ||
| - ${X11_Xkb_INCLUDE_PATH} | ||
| - ${X11_Xlib_INCLUDE_PATH} | ||
| - ${XCB_XCB_INCLUDE_DIR} | ||
| - ) | ||
| - target_link_libraries(kmodifierkey_xcb PRIVATE ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} Qt5::X11Extras KF5::GuiAddons) | ||
| - install( TARGETS kmodifierkey_xcb DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kguiaddons/kmodifierkey/) | ||
| - endif() | ||
| -endif () | ||
| +if (Qt5X11Extras_FOUND) | ||
| + add_library(kmodifierkey_xcb MODULE util/kmodifierkeyinfoprovider_xcb.cpp) | ||
| + target_include_directories (kmodifierkey_xcb PRIVATE | ||
| + ${X11_Xkb_INCLUDE_PATH} | ||
| + ${X11_Xlib_INCLUDE_PATH} | ||
| + ${XCB_XCB_INCLUDE_DIR} | ||
| + ) | ||
| + target_link_libraries(kmodifierkey_xcb PRIVATE ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} Qt5::X11Extras KF5::GuiAddons) | ||
| + install( TARGETS kmodifierkey_xcb DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kguiaddons/kmodifierkey/) | ||
| +endif() | ||
|
|
||
| ecm_generate_headers(KGuiAddons_HEADERS | ||
| HEADER_NAMES | ||
| -- | ||
| GitLab | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| diff --git a/KF5GuiAddonsConfig.cmake.in b/KF5GuiAddonsConfig.cmake.in | ||
| index ae17f6b..34e41bd 100644 | ||
| --- a/KF5GuiAddonsConfig.cmake.in | ||
| +++ b/KF5GuiAddonsConfig.cmake.in | ||
| @@ -10,6 +10,7 @@ if (NOT @BUILD_SHARED_LIBS@) | ||
| find_dependency(Qt5X11Extras @REQUIRED_QT_VERSION@) | ||
| endif() | ||
| if (@WITH_WAYLAND@) | ||
| + set(QtWaylandScanner_EXECUTABLE "${PACKAGE_PREFIX}/tools/qt5-wayland/bin/qtwaylandscanner" CACHE STRING "QtWaylandScanner workaround") | ||
| find_dependency(Wayland REQUIRED Client) | ||
| find_dependency(Qt5WaylandClient @REQUIRED_QT_VERSION@) | ||
| find_dependency(QtWaylandScanner) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.