Skip to content

Commit

Permalink
- Added special build time option for Flatpak/Wayland (cmake -DCONFIG…
Browse files Browse the repository at this point in the history
…_WAYLAND=ON ...)
  • Loading branch information
rncbc committed Mar 1, 2022
1 parent 1512ee4 commit 1f59a7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ option (CONFIG_GRADIENT "Enable gradient eye-candy (default=yes)" 1)
# Enable debugger stack-trace option (assumes --enable-debug).
option (CONFIG_STACKTRACE "Enable debugger stack-trace (default=no)" 0)

# Enable Wayland support option.
option (CONFIG_WAYLAND "Enable Wayland support (EXPERIMENTAL) (default=no)" 0)

# Enable Qt6 build preference.
option (CONFIG_QT6 "Enable Qt6 build (default=yes)" 1)
Expand Down
3 changes: 3 additions & 0 deletions src/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,7 @@
/* Define if fluid_free function is available. */
#cmakedefine CONFIG_FLUID_FREE @CONFIG_FLUID_FREE@

/* Define if Wayland is supported */
#cmakedefine CONFIG_WAYLAND @CONFIG_WAYLAND@

#endif /* CONFIG_H */
2 changes: 1 addition & 1 deletion src/qsynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ int main ( int argc, char **argv )
::signal(SIGBUS, stacktrace);
#endif
#endif
#if defined(Q_OS_LINUX)
#if defined(Q_OS_LINUX) && !defined(CONFIG_WAYLAND)
::setenv("QT_QPA_PLATFORM", "xcb", 0);
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
Expand Down

0 comments on commit 1f59a7b

Please sign in to comment.