From 1574e4a386c2c884adb3ac7df679b0a43cedda78 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Tue, 25 Feb 2020 16:00:24 +0200 Subject: [PATCH] fdo: Add WPE backends directory to the library RPATH Set the RPATH of libcogplatform-fdo.so to the directory where WPE backends are installed. This is needed to ensure that it will be possible to find libWPEBackend-fdo-1.0 at runtime because the backends directory is not included in the default dynamic linker search paths. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd0bdf27..885e8f83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,7 @@ else () # There is no need to explicitly check wpe-1.0 here because it's a # dependency already specified in the wpe-webkit.pc file. pkg_check_modules(WEB_ENGINE REQUIRED wpe-webkit-1.0>=2.23.91) + pkg_get_variable(WPE_BACKENDS_DIR wpe-1.0 backendsdir) if ("${WEB_ENGINE_VERSION}" VERSION_GREATER "2.23") add_definitions(-DCOG_BG_COLOR_API_SUPPORTED=1) else () @@ -304,6 +305,9 @@ if (COG_PLATFORM_FDO AND NOT COG_USE_WEBKITGTK) add_library(cogplatform-fdo MODULE ${COGPLATFORM_FDO_SOURCES}) set_property(TARGET cogplatform-fdo PROPERTY C_STANDARD 99) + if (WPE_BACKENDS_DIR) + set_property(TARGET cogplatform-fdo PROPERTY INSTALL_RPATH ${WPE_BACKENDS_DIR}) + endif () target_include_directories(cogplatform-fdo PUBLIC wayland ${COGPLATFORM_FDO_INCLUDE_DIRS}) target_link_libraries(cogplatform-fdo cogcore ${COGPLATFORM_FDO_LDFLAGS}) target_compile_options(cogplatform-fdo