Commit d24425fa8ea3349f2ce7087dac3cba19481cc389

Carlos Martín Nieto 2016-04-29T18:34:03

Merge pull request #3764 from libgit2/ethomson/cmake_pc cmake: include threading libraries in pkg-config

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba3a518..337a26b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -161,6 +161,8 @@ FUNCTION(TARGET_OS_LIBRARIES target)
 
 	IF(THREADSAFE)
 		TARGET_LINK_LIBRARIES(${target} ${CMAKE_THREAD_LIBS_INIT})
+		LIST(APPEND LIBGIT2_PC_LIBS ${CMAKE_THREAD_LIBS_INIT})
+		SET(LIBGIT2_PC_LIBS ${LIBGIT2_PC_LIBS} PARENT_SCOPE)
 	ENDIF()
 ENDFUNCTION()