aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Schupp <wsnipex@a1.net>2023-03-27 19:58:34 +0200
committerGitHub <noreply@github.com>2023-03-27 19:58:34 +0200
commitc06f56dd5a5f4d62dac64ed69d7119be307b7902 (patch)
treea93d251c1b47ca07d45950007eccc40534b41100
parent083f9780c165465706570b72184ef1be0dfa54c4 (diff)
parent76bf06bbaa6a7cd27fbdb1d59696e1831e69f904 (diff)
Merge pull request #23028 from wsnipex/waylandpp_static
compile waylandpp static
-rw-r--r--cmake/modules/FindWaylandpp.cmake40
-rw-r--r--cmake/platform/linux/webos.cmake1
-rw-r--r--tools/depends/target/waylandpp/Makefile2
3 files changed, 37 insertions, 6 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)
diff --git a/tools/depends/target/waylandpp/Makefile b/tools/depends/target/waylandpp/Makefile
index 45f86614e4..c58843cd47 100644
--- a/tools/depends/target/waylandpp/Makefile
+++ b/tools/depends/target/waylandpp/Makefile
@@ -27,7 +27,7 @@ else
CMAKE_OPTIONS := -DBUILD_SCANNER=OFF -DWAYLAND_SCANNERPP=$(NATIVEPREFIX)/bin/wayland-scanner++ $(CMAKE_OPTIONS)
endif
-CMAKE_OPTIONS := -DBUILD_DOCUMENTATION=OFF -DBUILD_LIBRARIES=ON -DBUILD_EXAMPLES=OFF $(CMAKE_OPTIONS)
+CMAKE_OPTIONS := -DBUILD_DOCUMENTATION=OFF -DBUILD_LIBRARIES=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_EXAMPLES=OFF $(CMAKE_OPTIONS)
BUILDDIR = $(PLATFORM)/build
all: .installed-$(PLATFORM)