WebPlatformForEmbedded / WPEBackend-rdk

BSD 2-Clause "Simplified" License
8 stars 38 forks source link

cmake: Fix Wayland include dirs #94

Closed marcin-mielczarczyk-red closed 1 year ago

marcin-mielczarczyk-red commented 1 year ago

If Wayland includes are located in standard path i.e. "/usr/include" without any subdirectory, cmake function 'pkg_check_modules' will not set WAYLAND_INCLUDE_DIRS variable. 'pkg_check_modules' uses 'pkg-config --cflags-only-I' behind the scenes which ignores standard paths like "/usr/include". When WAYLAND_INCLUDE_DIRS is empty, 'find_package_handle_standard_args' function complains about it. To fix the issue, empty variable is detected first and then 'pkg_get_variable' function is used to get include dir path.