diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index dc1e3d8ce5..047fb4c0be 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -514,6 +514,12 @@ if(BUILD_LUA_CAIRO) set(luacairo_includes ${CAIROXLIB_INCLUDE_DIRS} ${luacairo_includes}) endif(BUILD_LUA_CAIRO_XLIB) + list(REMOVE_DUPLICATES luacairo_libs) + if("-lX11" IN_LIST luacairo_libs) + list(REMOVE_ITEM luacairo_libs "-lX11" "-lXext") + set(luacairo_libs ${X11_LIBRARIES} ${luacairo_libs}) + endif("-lX11" IN_LIST luacairo_libs) + find_program(APP_PATCH patch) if(NOT APP_PATCH)