Skip to content

Commit dd07a83

Browse files
committed
Build fixes for newly introduced Wayland support.
1 parent 09da5bb commit dd07a83

File tree

5 files changed

+32
-34
lines changed

5 files changed

+32
-34
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ RUN sh -c 'if [ "$X11" = "yes" ] ; then \
7676
-DBUILD_NVIDIA=ON \
7777
-DBUILD_PULSEAUDIO=ON \
7878
-DBUILD_RSS=ON \
79+
-DBUILD_WAYLAND=OFF \
7980
-DBUILD_WLAN=ON \
8081
-DBUILD_XMMS2=ON \
8182
../ \
@@ -96,6 +97,7 @@ RUN sh -c 'if [ "$X11" = "yes" ] ; then \
9697
-DBUILD_MYSQL=ON \
9798
-DBUILD_PULSEAUDIO=ON \
9899
-DBUILD_RSS=ON \
100+
-DBUILD_WAYLAND=OFF \
99101
-DBUILD_WLAN=ON \
100102
-DBUILD_X11=OFF \
101103
-DBUILD_XMMS2=ON \

appimage/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ cmake \
4848
-DBUILD_NVIDIA=ON \
4949
-DBUILD_PULSEAUDIO=ON \
5050
-DBUILD_RSS=ON \
51+
-DBUILD_WAYLAND=OFF \
5152
-DBUILD_WLAN=ON \
5253
-DBUILD_X11=ON \
5354
-DBUILD_XMMS2=ON \

cmake/ConkyPlatformChecks.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -353,22 +353,22 @@ if(BUILD_X11)
353353
endif(BUILD_X11)
354354

355355
if(BUILD_WAYLAND)
356-
find_package(Wayland REQUIRED)
357-
set(conky_libs ${conky_libs} ${WAYLAND_CLIENT_LIBRARY})
358-
set(conky_includes ${conky_includes} ${WAYLAND_CLIENT_INCLUDE_DIR})
356+
find_package(Wayland REQUIRED)
357+
set(conky_libs ${conky_libs} ${Wayland_CLIENT_LIBRARY})
358+
set(conky_includes ${conky_includes} ${Wayland_CLIENT_INCLUDE_DIR})
359359

360360
find_package(PkgConfig)
361361

362362
pkg_check_modules(wayland-protocols QUIET wayland-protocols>=1.13)
363-
if(WAYLAND_CLIENT_FOUND AND wayland-protocols_FOUND)
363+
if(Wayland_FOUND AND wayland-protocols_FOUND)
364364
# find Wayland protocols
365-
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
365+
pkg_get_variable(Wayland_PROTOCOLS_DIR wayland-protocols pkgdatadir)
366366

367367
# find 'wayland-scanner' executable
368-
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
369-
else(WAYLAND_CLIENT_FOUND AND wayland-protocols_FOUND)
368+
pkg_get_variable(Wayland_SCANNER wayland-scanner wayland_scanner)
369+
else(Wayland_FOUND AND wayland-protocols_FOUND)
370370
message(FATAL_ERROR "Unable to find wayland-scanner and xdg-shell protocol")
371-
endif(WAYLAND_CLIENT_FOUND AND wayland-protocols_FOUND)
371+
endif(Wayland_FOUND AND wayland-protocols_FOUND)
372372

373373
pkg_check_modules(PANGOCAIRO pangocairo)
374374
set(conky_libs ${conky_libs} ${PANGOCAIRO_LIBRARIES})

cmake/FindWayland.cmake

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,54 @@
11
find_path(
2-
WAYLAND_CLIENT_INCLUDE_DIR
2+
Wayland_CLIENT_INCLUDE_DIR
33
NAMES wayland-client.h
44
)
55

66
find_library(
7-
WAYLAND_CLIENT_LIBRARY
7+
Wayland_CLIENT_LIBRARY
88
NAMES wayland-client libwayland-client
99
)
1010

11-
if(WAYLAND_CLIENT_INCLUDE_DIR AND WAYLAND_CLIENT_LIBRARY)
11+
if(Wayland_CLIENT_INCLUDE_DIR AND Wayland_CLIENT_LIBRARY)
1212
add_library(wayland::client UNKNOWN IMPORTED)
1313

1414
set_target_properties(
1515
wayland::client PROPERTIES
16-
INTERFACE_INCLUDE_DIRECTORIES "${WAYLAND_CLIENT_INCLUDE_DIR}"
16+
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_CLIENT_INCLUDE_DIR}"
1717
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
18-
IMPORTED_LOCATION "${WAYLAND_CLIENT_LIBRARY}"
18+
IMPORTED_LOCATION "${Wayland_CLIENT_LIBRARY}"
1919
)
2020
endif()
2121

2222
find_path(
23-
WAYLAND_SERVER_INCLUDE_DIR
23+
Wayland_SERVER_INCLUDE_DIR
2424
NAMES wayland-server.h
2525
)
2626

2727
find_library(
28-
WAYLAND_SERVER_LIBRARY
28+
Wayland_SERVER_LIBRARY
2929
NAMES wayland-server libwayland-server
3030
)
3131

32-
if(WAYLAND_SERVER_INCLUDE_DIR AND WAYLAND_SERVER_LIBRARY)
32+
if(Wayland_SERVER_INCLUDE_DIR AND Wayland_SERVER_LIBRARY)
3333
add_library(wayland::server UNKNOWN IMPORTED)
3434

3535
set_target_properties(
3636
wayland::server PROPERTIES
37-
INTERFACE_INCLUDE_DIRECTORIES "${WAYLAND_SERVER_INCLUDE_DIR}"
37+
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_SERVER_INCLUDE_DIR}"
3838
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
39-
IMPORTED_LOCATION "${WAYLAND_SERVER_LIBRARY}"
39+
IMPORTED_LOCATION "${Wayland_SERVER_LIBRARY}"
4040
)
4141
endif()
4242

4343
include(FindPackageHandleStandardArgs)
4444
find_package_handle_standard_args(
45-
WAYLAND_CLIENT
46-
REQUIRED_VARS WAYLAND_CLIENT_LIBRARY WAYLAND_CLIENT_INCLUDE_DIR
47-
)
48-
49-
find_package_handle_standard_args(
50-
WAYLAND_SERVER
51-
REQUIRED_VARS WAYLAND_SERVER_LIBRARY WAYLAND_SERVER_INCLUDE_DIR
45+
Wayland
46+
REQUIRED_VARS Wayland_CLIENT_LIBRARY Wayland_CLIENT_INCLUDE_DIR Wayland_SERVER_LIBRARY Wayland_SERVER_INCLUDE_DIR
5247
)
5348

5449
mark_as_advanced(
55-
WAYLAND_CLIENT_INCLUDE_DIR
56-
WAYLAND_CLIENT_LIBRARY
57-
WAYLAND_SERVER_INCLUDE_DIR
58-
WAYLAND_SERVER_LIBRARY
50+
Wayland_CLIENT_INCLUDE_DIR
51+
Wayland_CLIENT_LIBRARY
52+
Wayland_SERVER_INCLUDE_DIR
53+
Wayland_SERVER_LIBRARY
5954
)

src/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,22 +247,22 @@ if(BUILD_WAYLAND)
247247
set(wl_srcs wl.cc wl.h xdg-shell-protocol.c wlr-layer-shell-protocol.c x11-color.cc x11-color.h)
248248
set(optional_sources ${optional_sources} ${wl_srcs})
249249
# generate protocol implementations
250-
set(XDG_PROT_DEF "${WAYLAND_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml")
250+
set(XDG_PROT_DEF "${Wayland_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml")
251251
add_custom_command(
252252
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell-client-protocol.h
253-
COMMAND ${WAYLAND_SCANNER} client-header ${XDG_PROT_DEF} xdg-shell-client-protocol.h)
253+
COMMAND ${Wayland_SCANNER} client-header ${XDG_PROT_DEF} xdg-shell-client-protocol.h)
254254
add_custom_command(
255255
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell-protocol.c
256-
COMMAND ${WAYLAND_SCANNER} private-code ${XDG_PROT_DEF} xdg-shell-protocol.c
256+
COMMAND ${Wayland_SCANNER} private-code ${XDG_PROT_DEF} xdg-shell-protocol.c
257257
DEPENDS xdg-shell-client-protocol.h)
258258

259259
set(WLR_LAYER_SHELL_PROT_DEF "${CMAKE_CURRENT_SOURCE_DIR}/wlr-layer-shell-unstable-v1.xml")
260260
add_custom_command(
261261
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-client-protocol.h
262-
COMMAND ${WAYLAND_SCANNER} client-header ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-client-protocol.h)
262+
COMMAND ${Wayland_SCANNER} client-header ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-client-protocol.h)
263263
add_custom_command(
264264
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-protocol.c
265-
COMMAND ${WAYLAND_SCANNER} private-code ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-protocol.c
265+
COMMAND ${Wayland_SCANNER} private-code ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-protocol.c
266266
DEPENDS wlr-layer-shell-client-protocol.h)
267267

268268
# include output dir in include path

0 commit comments

Comments
 (0)