Previous submission was incomplete. I am sorry. OBS-URL: https://build.opensuse.org/request/show/921359 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libamqpcpp?expand=0&rev=7
30 lines
998 B
Diff
30 lines
998 B
Diff
From b4dc70403e764133dcaa382d3064f8d80beab751 Mon Sep 17 00:00:00 2001
|
|
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
|
|
Date: Fri, 24 Sep 2021 15:57:14 +0300
|
|
Subject: [PATCH] Fix TCP module build for old gcc versions
|
|
|
|
TCP module uses std::thread internally, so it is required to link pthreads
|
|
explicitly when building with old gcc versions.
|
|
---
|
|
CMakeLists.txt | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index a0200eb..f2074bf 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -128,7 +128,9 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
|
|
)
|
|
|
|
if(AMQP-CPP_LINUX_TCP)
|
|
- target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
|
|
+ find_package(Threads REQUIRED)
|
|
+
|
|
+ target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS} Threads::Threads)
|
|
# Find OpenSSL and provide include dirs
|
|
find_package(OpenSSL REQUIRED)
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${OPENSSL_INCLUDE_DIR})
|
|
--
|
|
2.26.2
|
|
|