cmake: locate wayland-scanner via find_program instead of pkg-config
particularly when cross compiling, we want to use the wayland-scanner which is on the PATH of the build machine -- not the wayland-scanner which will be on the target machine and could be for an architecture we can't invoke during build.
This commit is contained in:
parent
fc8be986ca
commit
4744a9fba5
|
@ -408,6 +408,9 @@ if(BUILD_X11)
|
|||
endif(BUILD_X11)
|
||||
|
||||
if(BUILD_WAYLAND)
|
||||
# find 'wayland-scanner' executable
|
||||
find_program(Wayland_SCANNER NAMES wayland-scanner)
|
||||
|
||||
find_package(Wayland REQUIRED)
|
||||
set(conky_libs ${conky_libs} ${Wayland_CLIENT_LIBRARY})
|
||||
set(conky_includes ${conky_includes} ${Wayland_CLIENT_INCLUDE_DIR})
|
||||
|
@ -419,9 +422,6 @@ if(BUILD_WAYLAND)
|
|||
if(Wayland_FOUND AND wayland-protocols_FOUND)
|
||||
# find Wayland protocols
|
||||
pkg_get_variable(Wayland_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
|
||||
# find 'wayland-scanner' executable
|
||||
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_FOUND AND wayland-protocols_FOUND)
|
||||
|
|
Loading…
Reference in New Issue