From bb0fbf94ae571f4199f763b0a758c57448b8ebd5 Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 14 Dec 2016 01:33:12 +0000 Subject: [PATCH] Fix Libs line in toxcore.pc pkg-config file. CMake lists are `;` separated and CMAKE_THREAD_LIBS_INIT contains "-lpthread". This resulted in "-l-lpthread;-lrt" on Linux. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0733d83b..bf41fb7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,7 +223,7 @@ target_link_modules(toxnetwork toxcrypto) if(CMAKE_THREAD_LIBS_INIT) target_link_modules(toxnetwork ${CMAKE_THREAD_LIBS_INIT}) - set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-l${CMAKE_THREAD_LIBS_INIT}") + set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} ${CMAKE_THREAD_LIBS_INIT}) endif() if(RT_LIBRARIES) @@ -525,6 +525,8 @@ endif() # ################################################################################ +string(REPLACE ";" " " toxcore_PKGCONFIG_LIBS "${toxcore_PKGCONFIG_LIBS}") + if(BUILD_TOXAV) configure_file( "${CMAKE_SOURCE_DIR}/other/pkgconfig/toxav.pc.in"