blob: 6879493123515e8aebe40bb92571c0ed3db95b89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
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
|