Skip to content

Commit

Permalink
Fix Libs line in toxcore.pc pkg-config file.
Browse files Browse the repository at this point in the history
CMake lists are `;` separated and CMAKE_THREAD_LIBS_INIT contains
"-lpthread". This resulted in "-l-lpthread;-lrt" on Linux.
  • Loading branch information
iphydf committed Dec 14, 2016
1 parent 4cf6999 commit 40b7f1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 40b7f1a

Please sign in to comment.