Improve detection of the location of Wayland protocol files across OSes
This commit is contained in:
parent
70252b0c1a
commit
64ac7b47b8
@ -20,12 +20,7 @@ OBJECTS = fl_libdecor.o libdecor-cairo-blur.o fl_libdecor-plugins.o \
|
|||||||
../../src/xdg-decoration-protocol.o ../../src/xdg-shell-protocol.o \
|
../../src/xdg-decoration-protocol.o ../../src/xdg-shell-protocol.o \
|
||||||
../../src/text-input-protocol.o cursor-settings.o os-compatibility.o
|
../../src/text-input-protocol.o cursor-settings.o os-compatibility.o
|
||||||
|
|
||||||
|
PROTOCOLS = `pkg-config --variable=pkgdatadir wayland-protocols`
|
||||||
# ${UNAME} is set to the product of `uname -s` in makeinclude
|
|
||||||
|
|
||||||
Linux_PROTO = /usr/share/wayland-protocols
|
|
||||||
FreeBSD_PROTO = /usr/local/share/wayland-protocols
|
|
||||||
PROTOCOLS = ${${UNAME}_PROTO}
|
|
||||||
|
|
||||||
Linux_CFLAGS =
|
Linux_CFLAGS =
|
||||||
FreeBSD_CFLAGS = -I/usr/local/include
|
FreeBSD_CFLAGS = -I/usr/local/include
|
||||||
|
@ -644,11 +644,8 @@ if (UNIX AND OPTION_USE_WAYLAND)
|
|||||||
if (NOT (CMAKE_VERSION VERSION_LESS 3.4))
|
if (NOT (CMAKE_VERSION VERSION_LESS 3.4))
|
||||||
pkg_get_variable(PROTOCOLS wayland-protocols pkgdatadir) # requires cmake 3.4
|
pkg_get_variable(PROTOCOLS wayland-protocols pkgdatadir) # requires cmake 3.4
|
||||||
else()
|
else()
|
||||||
if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
|
execute_process(COMMAND pkg-config --variable=pkgdatadir wayland-protocols
|
||||||
set(PROTOCOLS /usr/local/share/wayland-protocols)
|
OUTPUT_VARIABLE PROTOCOLS)
|
||||||
else ()
|
|
||||||
set(PROTOCOLS /usr/share/wayland-protocols)
|
|
||||||
endif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
|
|
||||||
endif (NOT (CMAKE_VERSION VERSION_LESS 3.4))
|
endif (NOT (CMAKE_VERSION VERSION_LESS 3.4))
|
||||||
if (NOT(EXISTS ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml))
|
if (NOT(EXISTS ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml))
|
||||||
message(WARNING "Install necessary file ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml")
|
message(WARNING "Install necessary file ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user