-
Notifications
You must be signed in to change notification settings - Fork 327
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
Enable build without libxau and libxcb dependencies #1895
base: develop
Are you sure you want to change the base?
Conversation
This allows a better abstraction of the used display server.
This allows a better abstraction of the used display server.
This allows a better abstraction of the used display server.
@@ -12,7 +12,7 @@ message(STATUS "Building greeter for Qt ${QT_MAJOR_VERSION} as ${GREETER_TARGET} | |||
include_directories( | |||
"${CMAKE_SOURCE_DIR}/src/common" | |||
"${CMAKE_BINARY_DIR}/src/common" | |||
"${LIBXCB_INCLUDE_DIR}" | |||
${LIBXCB_INCLUDE_DIR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? If it can't include multiple dirs it should probably remain quoted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty string fails when building with BUILD_WITH_X11=OFF
. The variable itself should be either a string or a list. In both cases, it requires no quoting. But I'm not too deep into CMake...
@@ -34,7 +37,8 @@ target_link_libraries(sddm-helper | |||
Qt${QT_MAJOR_VERSION}::Network | |||
Qt${QT_MAJOR_VERSION}::DBus | |||
Qt${QT_MAJOR_VERSION}::Qml | |||
${LIBXAU_LINK_LIBRARIES}) | |||
${LIBXAU_LINK_LIBRARIES} | |||
${JOURNALD_LIBRARIES}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unconditional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, by not doing the find_package
those variables should be empty. Hence, including them unconditionally would have no effect.
I'm not sure how valuable it is to avoid libxau and libxcb considering they will stay for the foreseeable future for Xwayland anyway. |
4f1d4c2
to
d93c7e7
Compare
Yes, I agree that those libraries will stay around for some time. But to get rid of them, people must stop using them. So with this, it is one less usage and a little bit more pressure on other applications to do the same. |
d93c7e7
to
089170e
Compare
5b597f4
to
842d343
Compare
@@ -24,8 +24,10 @@ | |||
#include "Configuration.h" | |||
#include "DaemonApp.h" | |||
#include "DisplayManager.h" | |||
#if BUILD_WITH_X11 == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if BUILD_WITH_X11 == 1 | |
#if BUILD_WITH_X11 |
src/daemon/Display.cpp
Outdated
break; | ||
#else | ||
case X11DisplayServerType: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation looks wrong
842d343
to
78ffd46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok from a quick view, needs a closer look at some point later
src/daemon/Display.cpp
Outdated
case X11DisplayServerType: | ||
case X11UserDisplayServerType: | ||
// Reset type to Wayland and fall through to initialization | ||
qWarning("Built without X11 support. Trying Wayland display server."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qWarning("Built without X11 support. Trying Wayland display server."); | |
qWarning() << "Built without X11 support. Trying Wayland display server."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also fixed now.
78ffd46
to
40912f3
Compare
Fixed some formatting issues. All your comments should be fixed. |
40912f3
to
3e55cbb
Compare
This allows building SDDM solely with Wayland support.
3e55cbb
to
f254103
Compare
Missed one. Also fixed now. |
Could we split out the automatic failover stuff to a separate pull request? That's useful even in the current setup. |
This PR enables building SDDM without dependencies on libxcb and libxau by setting the CMake flag
BUILD_WITH_X11 =OFF
. This way, it is possible to build and use SDDM on Wayland-only systems. By default this flag is set toON
.I kept preprocessor flags in the code to a minimum by using runtime polymorphism wherever feasible. In a few places runtime polymorphism would have caused a high overhead. That is where I fell back on the preprocessor flag. I see those as future places for refactoring.
Fixes: #1420