diff options
author | Daniel E <daniel.engberg.lists@pyret.net> | 2021-02-14 20:25:21 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2021-02-15 09:09:09 +0100 |
commit | b2aeca5fda870751f3c9d645e0dca4c80fa1ae5a (patch) | |
tree | 85d050b7bbef4fba8878be9937c276d73207f12d /CMakeLists.txt | |
parent | 7849316ccfc794026176d462b9008e7f4c4240fe (diff) | |
download | freetype2-b2aeca5fda870751f3c9d645e0dca4c80fa1ae5a.tar.gz |
* CMakeLists.txt: Improve 'bz2' support.
Not all distributions such as FreeBSD provide a `.pc` file for
'(lib)bz2' so follow autotools and add it to `Libs.private` instead.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e7f707cf1..81648a9cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -443,6 +443,7 @@ endif () set(PKG_CONFIG_REQUIRED_PRIVATE "") +set(PKG_CONFIG_LIBS_PRIVATE "") if (ZLIB_FOUND) target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES}) @@ -452,7 +453,7 @@ endif () if (BZIP2_FOUND) target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES}) target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS - list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2") + list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2") endif () if (PNG_FOUND) target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES}) @@ -511,7 +512,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) - string(REPLACE "%LIBS_PRIVATE%" "" # All libs support pkg-config + string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc") |