From 1b8fbcfd2fc8a38c000b9288d1e30cecda9cd680 Mon Sep 17 00:00:00 2001 From: Alexander Damian Date: Tue, 20 Aug 2019 15:57:56 -0400 Subject: [PATCH] Add openssl to the required library list in pkg_config file --- CMakeLists.txt | 6 ++++++ packaging/cassandra_static.pc.in | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 523ddcb75..3c0c828cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,12 @@ if(CASS_BUILD_STATIC) endif() CassConfigureStatic("CASS") + # Set pkg_config required libraries + set(PC_REQUIRED_LIBS "libuv") + if (CASS_USE_OPENSSL) + set(PC_REQUIRED_LIBS "${PC_REQUIRED_LIBS} openssl") + endif() + # Update the test flags to indicate the use of the static library if(CASS_USE_STATIC_LIBS) set(TEST_CXX_FLAGS "${TEST_CXX_FLAGS} -DCASS_STATIC") diff --git a/packaging/cassandra_static.pc.in b/packaging/cassandra_static.pc.in index fefe7f255..4ec341437 100644 --- a/packaging/cassandra_static.pc.in +++ b/packaging/cassandra_static.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: cassandra Description: A C/C++ client driver for Apache Cassandra Version: @version@ -Requires: libuv +Requires: @PC_REQUIRED_LIBS@ Libs: -L${libdir} -l@PROJECT_LIB_NAME_STATIC@ -lstdc++ Cflags: URL: https://github.com/datastax/cpp-driver/