1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 03:53:23 +02:00

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
This commit is contained in:
Maxim Cournoyer 2022-11-11 22:38:32 -05:00 committed by Sébastien Blin
parent c58e3eb561
commit e2ce5c4d98
2 changed files with 7 additions and 5 deletions

View file

@ -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(

View file

@ -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"))