From 905aa15464a450b5c6b7497c2c0debf326455ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tin=20=C5=A0vagelj?= Date: Sat, 16 Nov 2024 08:52:55 +0100 Subject: [PATCH] Fix X11 library references for lua modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tin Å vagelj --- cmake/ConkyPlatformChecks.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index dc1e3d8ce..75b4f3e43 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -514,6 +514,14 @@ if(BUILD_LUA_CAIRO) set(luacairo_includes ${CAIROXLIB_INCLUDE_DIRS} ${luacairo_includes}) endif(BUILD_LUA_CAIRO_XLIB) + # This is required because OpenBSD requires X11_LIBRARIES instead of -lX11 + # because X11 isn't in default linker search path + list(REMOVE_DUPLICATES luacairo_libs) + if("X11" IN_LIST luacairo_libs) + list(REMOVE_ITEM luacairo_libs "X11" "Xext") + set(luacairo_libs ${X11_LIBRARIES} ${luacairo_libs}) + endif("X11" IN_LIST luacairo_libs) + find_program(APP_PATCH patch) if(NOT APP_PATCH)