aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2023-09-10 13:29:08 +1000
committerfuzzard <fuzzard@kodi.tv>2023-09-11 14:03:54 +1000
commitb9202156b8d1ad6f484bdb4e60d164ecf5c740ef (patch)
treeb977402a2f21b3b9b35a3b582b74690ab69680d9
parent94250a03ad5ba7365e9492fb3f12f79820d5af3d (diff)
[cmake] FindWaylandProtocolsWebOS simplify find module
Remove manual pkgconfig file from dependency build. It hardcodes things, and isnt needed for our purposes as all.
-rw-r--r--cmake/modules/FindWaylandProtocolsWebOS.cmake21
-rw-r--r--tools/depends/target/webos-wayland-extensions/Makefile6
2 files changed, 6 insertions, 21 deletions
diff --git a/cmake/modules/FindWaylandProtocolsWebOS.cmake b/cmake/modules/FindWaylandProtocolsWebOS.cmake
index 979c34d660..041ea2bffa 100644
--- a/cmake/modules/FindWaylandProtocolsWebOS.cmake
+++ b/cmake/modules/FindWaylandProtocolsWebOS.cmake
@@ -4,24 +4,15 @@
#
# This will define the following variables::
#
-# WAYLANDPROTOCOLSWEBOS_FOUND - systm has wayland-webos-client
# WAYLANDPROTOCOLSWEBOS_PROTOCOLSDIR - directory containing the additional webOS Wayland protocols
# from the webos-wayland-extensions package
-if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_WAYLAND_WEBOS_CLIENT wayland-webos-client>=1.0.0)
-endif()
-find_path(WAYLAND_PROTOCOLS_WEBOS_PROTOCOLDIR NAMES wayland-webos/webos-shell.xml
- PATHS ${DEPENDS_PATH}/share)
+find_path(WAYLANDPROTOCOLSWEBOS_PROTOCOLSDIR NAMES webos-shell.xml
+ PATH_SUFFIXES wayland-webos
+ PATHS ${DEPENDS_PATH}/share
+ REQUIRED)
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WaylandProtocolsWebOS
- REQUIRED_VARS WAYLAND_PROTOCOLS_WEBOS_PROTOCOLDIR
- VERSION_VAR WAYLAND_WEBOS_SERVER_VERSION)
-
-if(WAYLANDPROTOCOLSWEBOS_FOUND)
- # Promote to cache variables so all code can access it
- set(WAYLANDPROTOCOLSWEBOS_PROTOCOLSDIR "${WAYLAND_PROTOCOLS_WEBOS_PROTOCOLDIR}/wayland-webos" CACHE INTERNAL "")
-endif()
+include(FindPackageMessage)
+find_package_message(WaylandProtocolsWebOS "Found WaylandProtocols-WebOS: ${WAYLANDPROTOCOLSWEBOS_PROTOCOLSDIR}" "[${WAYLANDPROTOCOLSWEBOS_PROTOCOLSDIR}]")
mark_as_advanced(WAYLANDPROTOCOLSWEBOS_PROTOCOLSDIR)
diff --git a/tools/depends/target/webos-wayland-extensions/Makefile b/tools/depends/target/webos-wayland-extensions/Makefile
index 64d975bd78..90022df192 100644
--- a/tools/depends/target/webos-wayland-extensions/Makefile
+++ b/tools/depends/target/webos-wayland-extensions/Makefile
@@ -17,12 +17,6 @@ $(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE)
.installed-$(PLATFORM): $(PLATFORM)
mkdir -p $(PREFIX)/share/wayland-webos $(PREFIX)/lib/pkgconfig
- rm -f ${PREFIX}/lib/pkgconfig/wayland-webos-client.pc
- echo 'includedir=$(PREFIX)/include' >> ${PREFIX}/lib/pkgconfig/wayland-webos-client.pc
- echo 'Name: wayland-webos-client' >> ${PREFIX}/lib/pkgconfig/wayland-webos-client.pc
- echo 'Description: wayland-webos-client' >> ${PREFIX}/lib/pkgconfig/wayland-webos-client.pc
- echo 'Version: 1.0.0' >> ${PREFIX}/lib/pkgconfig/wayland-webos-client.pc
-
cp $(PLATFORM)/protocol/webos-shell.xml $(PREFIX)/share/wayland-webos
cp $(PLATFORM)/protocol/webos-foreign.xml $(PREFIX)/share/wayland-webos
touch $@