From 9e09e282b6335251291a06215366cdf8b394b9a6 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Mon, 18 Dec 2017 15:02:26 +0100 Subject: [PATCH] Add private dependencies to pkg-config file --- CMakeLists.txt | 3 +++ src/bamtools.pc.in | 1 + 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f19f4ed7..e590f89e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,8 +78,11 @@ endif() find_package( PkgConfig ) pkg_search_module( JSONCPP jsoncpp>=1 ) +set( BAMTOOLS_PRIVATE_DEPS "zlib" ) + if( JSONCPP_FOUND ) message( "Found system JsonCpp, not using bundled version" ) + set( BAMTOOLS_PRIVATE_DEPS "${BAMTOOLS_PRIVATE_DEPS} jsoncpp" ) else() message( "Did NOT find system JsonCpp, instead using bundled version" ) set( JSONCPP_LDFLAGS jsoncpp ) diff --git a/src/bamtools.pc.in b/src/bamtools.pc.in index faf8083e..59c3017b 100644 --- a/src/bamtools.pc.in +++ b/src/bamtools.pc.in @@ -5,5 +5,6 @@ Name: BamTools Description: BamTools is a C++ library for reading and manipulating BAM files Version: @BamTools_VERSION@ +Requires.private: @BAMTOOLS_PRIVATE_DEPS@ Libs: -L${libdir} -lbamtools Cflags: -I${includedir}