diff options
author | wsnipex <wsnipex@a1.net> | 2023-03-21 18:16:13 +0100 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2023-03-25 18:13:00 +0100 |
commit | 76bf06bbaa6a7cd27fbdb1d59696e1831e69f904 (patch) | |
tree | ed8e4fbd7668caef226e21271eeeed10f53769c9 /cmake | |
parent | aaf4ffbcccc2dde2b39684c0206c8056aeca46b8 (diff) |
[cmake] build waylandpp static
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindWaylandpp.cmake | 40 | ||||
-rw-r--r-- | cmake/platform/linux/webos.cmake | 1 |
2 files changed, 36 insertions, 5 deletions
diff --git a/cmake/modules/FindWaylandpp.cmake b/cmake/modules/FindWaylandpp.cmake index ba229d7ffc..06ed683e8a 100644 --- a/cmake/modules/FindWaylandpp.cmake +++ b/cmake/modules/FindWaylandpp.cmake @@ -34,9 +34,34 @@ find_library(WAYLANDPP_CLIENT_LIBRARY NAMES wayland-client++ find_library(WAYLANDPP_CURSOR_LIBRARY NAMES wayland-cursor++ PATHS ${PC_WAYLANDPP_LIBRARY_DIRS}) -find_library(WAYLANDPP_EGL NAMES wayland-egl++ - PATHS ${PC_WAYLANDPP_LIBRARY_DIRS}) +find_library(WAYLANDPP_EGL_LIBRARY NAMES wayland-egl++ + PATHS ${PC_WAYLANDPP_LIBRARY_DIRS}) +if(KODI_DEPENDSBUILD) + pkg_check_modules(PC_WAYLANDC wayland-client wayland-egl wayland-cursor QUIET) + + if(PREFER_TOOLCHAIN_PATH) + set(WAYLAND_SEARCH_PATH ${PREFER_TOOLCHAIN_PATH} + NO_DEFAULT_PATH + PATH_SUFFIXES usr/lib) + else() + set(WAYLAND_SEARCH_PATH ${PC_WAYLANDC_LIBRARY_DIRS}) + endif() + + find_library(WAYLANDC_CLIENT_LIBRARY NAMES wayland-client + PATHS ${WAYLAND_SEARCH_PATH} + REQUIRED) + find_library(WAYLANDC_CURSOR_LIBRARY NAMES wayland-cursor + PATHS ${WAYLAND_SEARCH_PATH} + REQUIRED) + find_library(WAYLANDC_EGL_LIBRARY NAMES wayland-egl + PATHS ${WAYLAND_SEARCH_PATH} + REQUIRED) + + set(WAYLANDPP_STATIC_DEPS ${WAYLANDC_CLIENT_LIBRARY} + ${WAYLANDC_CURSOR_LIBRARY} + ${WAYLANDC_EGL_LIBRARY}) +endif() # Promote to cache variables so all code can access it set(WAYLANDPP_PROTOCOLS_DIR "${PC_WAYLANDPP_PKGDATADIR}/protocols" CACHE INTERNAL "") @@ -50,7 +75,7 @@ find_package_handle_standard_args(Waylandpp REQUIRED_VARS WAYLANDPP_INCLUDE_DIR WAYLANDPP_CLIENT_LIBRARY WAYLANDPP_CURSOR_LIBRARY - WAYLANDPP_EGL + WAYLANDPP_EGL_LIBRARY WAYLANDPP_SCANNER VERSION_VAR WAYLANDPP_wayland-client++_VERSION) @@ -58,11 +83,16 @@ if(WAYLANDPP_FOUND) set(WAYLANDPP_INCLUDE_DIRS ${WAYLANDPP_INCLUDE_DIR}) set(WAYLANDPP_LIBRARIES ${WAYLANDPP_CLIENT_LIBRARY} ${WAYLANDPP_CURSOR_LIBRARY} - ${WAYLANDPP_EGL}) + ${WAYLANDPP_EGL_LIBRARY} + ${WAYLANDPP_STATIC_DEPS}) set(WAYLANDPP_DEFINITIONS -DHAVE_WAYLAND=1) endif() mark_as_advanced(WAYLANDPP_INCLUDE_DIR WAYLANDPP_CLIENT_LIBRARY + WAYLANDC_CLIENT_LIBRARY WAYLANDPP_CURSOR_LIBRARY - WAYLANDPP_EGL WAYLANDPP_SCANNER) + WAYLANDC_CURSOR_LIBRARY + WAYLANDPP_EGL_LIBRARY + WAYLANDC_EGL_LIBRARY + WAYLANDPP_SCANNER) diff --git a/cmake/platform/linux/webos.cmake b/cmake/platform/linux/webos.cmake index d065dea2dd..7535b7b330 100644 --- a/cmake/platform/linux/webos.cmake +++ b/cmake/platform/linux/webos.cmake @@ -8,3 +8,4 @@ list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocolsWebOS) list(APPEND PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-webos-protocols) list(APPEND ARCH_DEFINES -DTARGET_WEBOS) set(TARGET_WEBOS TRUE) +set(PREFER_TOOLCHAIN_PATH ${TOOLCHAIN}/${HOST}/sysroot) |