Skip to content

Commit

Permalink
Merge pull request #95 from tpopela/pkg-config-requires
Browse files Browse the repository at this point in the history
Require specific brotli libraries in pkg-config files
  • Loading branch information
rsheeter authored Oct 9, 2017
2 parents c9ad29d + aff949b commit 550cfa6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ endfunction(generate_pkg_config_path)
function(generate_pkg_config output_file)
set (options)
set (oneValueArgs NAME DESCRIPTION URL VERSION PREFIX LIBDIR INCLUDEDIR)
set (multiValueArgs DEPENDS_PRIVATE CFLAGS LIBRARIES)
set (multiValueArgs DEPENDS DEPENDS_PRIVATE CFLAGS LIBRARIES)
cmake_parse_arguments(GEN_PKG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
unset (options)
unset (oneValueArgs)
Expand Down Expand Up @@ -203,6 +203,10 @@ function(generate_pkg_config output_file)
file(APPEND "${output_file}" "Version: ${GEN_PKG_VERSION}\n")
endif()

if(GEN_PKG_DEPENDS)
file(APPEND "${output_file}" "Requires: ${GEN_PKG_DEPENDS}\n")
endif()

if(GEN_PKG_DEPENDS_PRIVATE)
file(APPEND "${output_file}" "Requires.private:")
foreach(lib ${GEN_PKG_DEPENDS_PRIVATE})
Expand Down Expand Up @@ -242,6 +246,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2dec.pc"
DESCRIPTION "WOFF2 decoder library"
URL "https://github.com/google/woff2"
VERSION "${WOFF2_VERSION}"
DEPENDS libbrotlidec
DEPENDS_PRIVATE libwoff2common
LIBRARIES woff2dec)

Expand All @@ -250,6 +255,7 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2enc.pc"
DESCRIPTION "WOFF2 encoder library"
URL "https://github.com/google/woff2"
VERSION "${WOFF2_VERSION}"
DEPENDS libbrotlienc
DEPENDS_PRIVATE libwoff2common
LIBRARIES woff2enc)

Expand Down

0 comments on commit 550cfa6

Please sign in to comment.