73 lines
2.3 KiB
Diff
73 lines
2.3 KiB
Diff
|
From 3db2a7802422e69f50030db854abfb72fbc9caa4 Mon Sep 17 00:00:00 2001
|
||
|
From: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
|
||
|
Date: Fri, 11 Nov 2022 22:38:32 -0500
|
||
|
Subject: [PATCH] Move xcb include/link directives from jami to libclient.
|
||
|
|
||
|
Relates to <https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/882>.
|
||
|
|
||
|
This problem was discovered when attempting to build the test suite:
|
||
|
|
||
|
ld: ../src/libclient/liblibjamiclient.a(avmodel.cpp.o): undefined
|
||
|
reference to symbol 'xcb_get_setup'
|
||
|
|
||
|
* CMakeLists.txt: [!(APPLE or MSVC] Move xcb includes and link directives to...
|
||
|
* src/libclient/CMakeLists.txt [!(APPLE or MSVC]: ... here.
|
||
|
|
||
|
Change-Id: If9b6653e157081300caad8f13cafe4979a49630b
|
||
|
---
|
||
|
CMakeLists.txt | 6 +-----
|
||
|
src/libclient/CMakeLists.txt | 6 ++++++
|
||
|
2 files changed, 7 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/client-qt/CMakeLists.txt b/client-qt/CMakeLists.txt
|
||
|
index d0a8fd70..2a09fd6c 100644
|
||
|
--- a/client-qt/CMakeLists.txt
|
||
|
+++ b/client-qt/CMakeLists.txt
|
||
|
@@ -384,8 +384,6 @@ elseif (NOT APPLE)
|
||
|
add_definitions(${LIBGDKPIXBUF_CFLAGS})
|
||
|
endif()
|
||
|
|
||
|
- pkg_check_modules(XCB xcb)
|
||
|
-
|
||
|
list(PREPEND CMAKE_PREFIX_PATH
|
||
|
${LIBJAMI_CONTRIB_DIR}/native/ffmpeg/libavutil)
|
||
|
pkg_check_modules(LIBAVUTIL libavutil>=55.75.100)
|
||
|
@@ -398,7 +396,6 @@ elseif (NOT APPLE)
|
||
|
${LIBNOTIFY_INCLUDE_DIRS}
|
||
|
${LIBGDKPIXBUF_INCLUDE_DIRS}
|
||
|
${GLIB_INCLUDE_DIRS}
|
||
|
- ${XCB_INCLUDE_DIRS}
|
||
|
${LIBAVUTIL_INCLUDE_DIRS})
|
||
|
|
||
|
set(JAMI_DATA_PREFIX "${CMAKE_INSTALL_PREFIX}/share")
|
||
|
@@ -586,8 +583,7 @@ elseif (NOT APPLE)
|
||
|
${LIBNOTIFY_LIBRARIES}
|
||
|
${LIBGDKPIXBUF_LIBRARIES}
|
||
|
${GLIB_LIBRARIES}
|
||
|
- ${GIO_LIBRARIES}
|
||
|
- ${XCB_LIBRARIES})
|
||
|
+ ${GIO_LIBRARIES})
|
||
|
|
||
|
# Installation rules
|
||
|
install(
|
||
|
diff --git a/client-qt/src/libclient/CMakeLists.txt b/client-qt/src/libclient/CMakeLists.txt
|
||
|
index 99780f5f..1dd32677 100644
|
||
|
--- a/client-qt/src/libclient/CMakeLists.txt
|
||
|
+++ b/client-qt/src/libclient/CMakeLists.txt
|
||
|
@@ -475,6 +475,12 @@ add_library(${LIBCLIENT_NAME} STATIC
|
||
|
foreach(QT_LIB ${QT_LIBS})
|
||
|
target_link_libraries(${LIBCLIENT_NAME} ${QT_LIB})
|
||
|
endforeach()
|
||
|
+
|
||
|
+if(NOT(APPLE OR MSVC))
|
||
|
+ pkg_check_modules(XCB xcb IMPORTED_TARGET)
|
||
|
+ target_link_libraries(${LIBCLIENT_NAME} PkgConfig::XCB)
|
||
|
+endif()
|
||
|
+
|
||
|
if(ENABLE_LIBWRAP)
|
||
|
target_link_libraries(${LIBCLIENT_NAME} qtwrapper ${LIBJAMI_LIB})
|
||
|
if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "MSVC"))
|
||
|
--
|
||
|
2.37.3
|
||
|
|