mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 00:58:36 +00:00
Build fixes for newly introduced Wayland support.
This commit is contained in:
parent
09da5bbf0c
commit
dd07a838c4
@ -76,6 +76,7 @@ RUN sh -c 'if [ "$X11" = "yes" ] ; then \
|
||||
-DBUILD_NVIDIA=ON \
|
||||
-DBUILD_PULSEAUDIO=ON \
|
||||
-DBUILD_RSS=ON \
|
||||
-DBUILD_WAYLAND=OFF \
|
||||
-DBUILD_WLAN=ON \
|
||||
-DBUILD_XMMS2=ON \
|
||||
../ \
|
||||
@ -96,6 +97,7 @@ RUN sh -c 'if [ "$X11" = "yes" ] ; then \
|
||||
-DBUILD_MYSQL=ON \
|
||||
-DBUILD_PULSEAUDIO=ON \
|
||||
-DBUILD_RSS=ON \
|
||||
-DBUILD_WAYLAND=OFF \
|
||||
-DBUILD_WLAN=ON \
|
||||
-DBUILD_X11=OFF \
|
||||
-DBUILD_XMMS2=ON \
|
||||
|
@ -48,6 +48,7 @@ cmake \
|
||||
-DBUILD_NVIDIA=ON \
|
||||
-DBUILD_PULSEAUDIO=ON \
|
||||
-DBUILD_RSS=ON \
|
||||
-DBUILD_WAYLAND=OFF \
|
||||
-DBUILD_WLAN=ON \
|
||||
-DBUILD_X11=ON \
|
||||
-DBUILD_XMMS2=ON \
|
||||
|
@ -353,22 +353,22 @@ if(BUILD_X11)
|
||||
endif(BUILD_X11)
|
||||
|
||||
if(BUILD_WAYLAND)
|
||||
find_package(Wayland REQUIRED)
|
||||
set(conky_libs ${conky_libs} ${WAYLAND_CLIENT_LIBRARY})
|
||||
set(conky_includes ${conky_includes} ${WAYLAND_CLIENT_INCLUDE_DIR})
|
||||
find_package(Wayland REQUIRED)
|
||||
set(conky_libs ${conky_libs} ${Wayland_CLIENT_LIBRARY})
|
||||
set(conky_includes ${conky_includes} ${Wayland_CLIENT_INCLUDE_DIR})
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(wayland-protocols QUIET wayland-protocols>=1.13)
|
||||
if(WAYLAND_CLIENT_FOUND AND wayland-protocols_FOUND)
|
||||
if(Wayland_FOUND AND wayland-protocols_FOUND)
|
||||
# find Wayland protocols
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
pkg_get_variable(Wayland_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
|
||||
# find 'wayland-scanner' executable
|
||||
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
||||
else(WAYLAND_CLIENT_FOUND AND wayland-protocols_FOUND)
|
||||
pkg_get_variable(Wayland_SCANNER wayland-scanner wayland_scanner)
|
||||
else(Wayland_FOUND AND wayland-protocols_FOUND)
|
||||
message(FATAL_ERROR "Unable to find wayland-scanner and xdg-shell protocol")
|
||||
endif(WAYLAND_CLIENT_FOUND AND wayland-protocols_FOUND)
|
||||
endif(Wayland_FOUND AND wayland-protocols_FOUND)
|
||||
|
||||
pkg_check_modules(PANGOCAIRO pangocairo)
|
||||
set(conky_libs ${conky_libs} ${PANGOCAIRO_LIBRARIES})
|
||||
|
@ -1,59 +1,54 @@
|
||||
find_path(
|
||||
WAYLAND_CLIENT_INCLUDE_DIR
|
||||
Wayland_CLIENT_INCLUDE_DIR
|
||||
NAMES wayland-client.h
|
||||
)
|
||||
|
||||
find_library(
|
||||
WAYLAND_CLIENT_LIBRARY
|
||||
Wayland_CLIENT_LIBRARY
|
||||
NAMES wayland-client libwayland-client
|
||||
)
|
||||
|
||||
if(WAYLAND_CLIENT_INCLUDE_DIR AND WAYLAND_CLIENT_LIBRARY)
|
||||
if(Wayland_CLIENT_INCLUDE_DIR AND Wayland_CLIENT_LIBRARY)
|
||||
add_library(wayland::client UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(
|
||||
wayland::client PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${WAYLAND_CLIENT_INCLUDE_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_CLIENT_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${WAYLAND_CLIENT_LIBRARY}"
|
||||
IMPORTED_LOCATION "${Wayland_CLIENT_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
WAYLAND_SERVER_INCLUDE_DIR
|
||||
Wayland_SERVER_INCLUDE_DIR
|
||||
NAMES wayland-server.h
|
||||
)
|
||||
|
||||
find_library(
|
||||
WAYLAND_SERVER_LIBRARY
|
||||
Wayland_SERVER_LIBRARY
|
||||
NAMES wayland-server libwayland-server
|
||||
)
|
||||
|
||||
if(WAYLAND_SERVER_INCLUDE_DIR AND WAYLAND_SERVER_LIBRARY)
|
||||
if(Wayland_SERVER_INCLUDE_DIR AND Wayland_SERVER_LIBRARY)
|
||||
add_library(wayland::server UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(
|
||||
wayland::server PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${WAYLAND_SERVER_INCLUDE_DIR}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Wayland_SERVER_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${WAYLAND_SERVER_LIBRARY}"
|
||||
IMPORTED_LOCATION "${Wayland_SERVER_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
WAYLAND_CLIENT
|
||||
REQUIRED_VARS WAYLAND_CLIENT_LIBRARY WAYLAND_CLIENT_INCLUDE_DIR
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
WAYLAND_SERVER
|
||||
REQUIRED_VARS WAYLAND_SERVER_LIBRARY WAYLAND_SERVER_INCLUDE_DIR
|
||||
Wayland
|
||||
REQUIRED_VARS Wayland_CLIENT_LIBRARY Wayland_CLIENT_INCLUDE_DIR Wayland_SERVER_LIBRARY Wayland_SERVER_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
WAYLAND_CLIENT_INCLUDE_DIR
|
||||
WAYLAND_CLIENT_LIBRARY
|
||||
WAYLAND_SERVER_INCLUDE_DIR
|
||||
WAYLAND_SERVER_LIBRARY
|
||||
Wayland_CLIENT_INCLUDE_DIR
|
||||
Wayland_CLIENT_LIBRARY
|
||||
Wayland_SERVER_INCLUDE_DIR
|
||||
Wayland_SERVER_LIBRARY
|
||||
)
|
||||
|
@ -247,22 +247,22 @@ if(BUILD_WAYLAND)
|
||||
set(wl_srcs wl.cc wl.h xdg-shell-protocol.c wlr-layer-shell-protocol.c x11-color.cc x11-color.h)
|
||||
set(optional_sources ${optional_sources} ${wl_srcs})
|
||||
# generate protocol implementations
|
||||
set(XDG_PROT_DEF "${WAYLAND_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml")
|
||||
set(XDG_PROT_DEF "${Wayland_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml")
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell-client-protocol.h
|
||||
COMMAND ${WAYLAND_SCANNER} client-header ${XDG_PROT_DEF} xdg-shell-client-protocol.h)
|
||||
COMMAND ${Wayland_SCANNER} client-header ${XDG_PROT_DEF} xdg-shell-client-protocol.h)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xdg-shell-protocol.c
|
||||
COMMAND ${WAYLAND_SCANNER} private-code ${XDG_PROT_DEF} xdg-shell-protocol.c
|
||||
COMMAND ${Wayland_SCANNER} private-code ${XDG_PROT_DEF} xdg-shell-protocol.c
|
||||
DEPENDS xdg-shell-client-protocol.h)
|
||||
|
||||
set(WLR_LAYER_SHELL_PROT_DEF "${CMAKE_CURRENT_SOURCE_DIR}/wlr-layer-shell-unstable-v1.xml")
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-client-protocol.h
|
||||
COMMAND ${WAYLAND_SCANNER} client-header ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-client-protocol.h)
|
||||
COMMAND ${Wayland_SCANNER} client-header ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-client-protocol.h)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/wlr-layer-shell-protocol.c
|
||||
COMMAND ${WAYLAND_SCANNER} private-code ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-protocol.c
|
||||
COMMAND ${Wayland_SCANNER} private-code ${WLR_LAYER_SHELL_PROT_DEF} wlr-layer-shell-protocol.c
|
||||
DEPENDS wlr-layer-shell-client-protocol.h)
|
||||
|
||||
# include output dir in include path
|
||||
|
Loading…
x
Reference in New Issue
Block a user