From c550e23cc1319e0b298fd60566452cfcf3af46ed Mon Sep 17 00:00:00 2001 From: Giovanni Panozzo Date: Sat, 6 Mar 2021 15:45:33 +0100 Subject: Allow spice plugin compilation with --no-undefined --- cmake/FindSpice.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/FindSpice.cmake b/cmake/FindSpice.cmake index cb8c13514..9d6417a1a 100644 --- a/cmake/FindSpice.cmake +++ b/cmake/FindSpice.cmake @@ -43,8 +43,14 @@ find_library(SPICE_CLIENT_GTK3_LIB NAMES spice-client-gtk-3.0 ${COMMON_LIB_DIR} ) -if(SPICE_CLIENT_GTK3_LIB) - set(SPICE_LIBRARIES ${SPICE_CLIENT_GTK3_LIB}) +find_library(SPICE_CLIENT_GLIB_LIB NAMES spice-client-glib-2.0 + PATHS + ${_SPICE_LIBRARY_DIRS} + ${COMMON_LIB_DIR} +) + +if(SPICE_CLIENT_GTK3_LIB AND SPICE_CLIENT_GLIB_LIB) + set(SPICE_LIBRARIES ${SPICE_CLIENT_GTK3_LIB} ${SPICE_CLIENT_GLIB_LIB}) message(STATUS "Spice-Libs: ${SPICE_LIBRARIES}") endif() -- cgit v1.2.3