From 98bc6b494166ddec84b68f8db49d6e0289d20776 Mon Sep 17 00:00:00 2001 From: theirix Date: Sat, 16 Jan 2021 10:04:06 +0300 Subject: [PATCH 1/3] Up CMake requirement to have OpenSSL targets --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dc6589..35318d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ # ON: Build posix handler implementation # OFF: Don't build posix handler implementation -cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.4 FATAL_ERROR) # project name project(amqpcpp) From d81abc09278c9a22a8fb23fa56c6f10467a9b378 Mon Sep 17 00:00:00 2001 From: theirix Date: Sat, 16 Jan 2021 10:04:30 +0300 Subject: [PATCH 2/3] Find and link OpenSSL when building linux tcp --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35318d9..4872ea3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,4 +129,7 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC if(AMQP-CPP_LINUX_TCP) target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) + # Find and link OpenSSL + find_package(OpenSSL REQUIRED) + target_link_libraries(${PROJECT_NAME} OpenSSL::SSL) endif() From e422fea4293c23068ee16dc1db3ec3c4a1ec8d43 Mon Sep 17 00:00:00 2001 From: theirix Date: Mon, 18 Jan 2021 16:51:40 +0300 Subject: [PATCH 3/3] Do not link OpenSSL, just provide include dirs --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4872ea3..908029b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,7 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC if(AMQP-CPP_LINUX_TCP) target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) - # Find and link OpenSSL + # Find OpenSSL and provide include dirs find_package(OpenSSL REQUIRED) - target_link_libraries(${PROJECT_NAME} OpenSSL::SSL) + target_include_directories(${PROJECT_NAME} PRIVATE ${OPENSSL_INCLUDE_DIR}) endif()