Skip to content

Commit

Permalink
[client] cmake: move X11 config directives to displayservers
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Mar 13, 2024
1 parent dc9065b commit 20972cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,12 @@ add_feature_info(ENABLE_ASAN ENABLE_ASAN "AddressSanitizer support.")
option(ENABLE_UBSAN "Build with UndefinedBehaviorSanitizer" OFF)
add_feature_info(ENABLE_UBSAN ENABLE_UBSAN "UndefinedBehaviorSanitizer support.")

option(ENABLE_X11 "Build with X11 support" ON)
add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")

option(ENABLE_PIPEWIRE "Build with PipeWire audio output support" ON)
add_feature_info(ENABLE_PIPEWIRE ENABLE_PIPEWIRE "PipeWire audio support.")

option(ENABLE_PULSEAUDIO "Build with PulseAudio audio output support" ON)
add_feature_info(ENABLE_PULSEAUDIO ENABLE_PULSEAUDIO "PulseAudio audio support.")

if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
endif()

add_compile_options(
"-Wall"
"-Wextra"
Expand Down
7 changes: 7 additions & 0 deletions client/displayservers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ function(add_displayserver name)
add_subdirectory(${name})
endfunction()

option(ENABLE_X11 "Build with X11 support" ON)
add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")

option(ENABLE_WAYLAND "Build with Wayland support" ON)
add_feature_info(ENABLE_WAYLAND ENABLE_WAYLAND "Wayland support.")

if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
endif()

# Add/remove displayservers here!
if (ENABLE_WAYLAND)
add_displayserver(Wayland)
Expand Down

0 comments on commit 20972cf

Please sign in to comment.