mirror of https://github.com/freetype/freetype
CMakeList.txt: Update code to handle recent changes for `freetype.pc`.
Fixes #1144.
This commit is contained in:
parent
8a33164dad
commit
385345037e
|
@ -498,7 +498,9 @@ if (BUILD_FRAMEWORK)
|
|||
endif ()
|
||||
|
||||
|
||||
set(PKGCONFIG_REQUIRES "")
|
||||
set(PKGCONFIG_REQUIRES_PRIVATE "")
|
||||
set(PKGCONFIG_LIBS "-L\${libdir} -lfreetype")
|
||||
set(PKGCONFIG_LIBS_PRIVATE "")
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
|
@ -569,10 +571,26 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
|||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" "${PKGCONFIG_REQUIRES_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" "${PKGCONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
else ()
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES%" "${PKGCONFIG_REQUIRES} ${PKGCONFIG_REQUIRES_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_REQUIRES_PRIVATE%" ""
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS%" "${PKGCONFIG_LIBS} ${PKGCONFIG_LIBS_PRIVATE}"
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
string(REPLACE "%PKGCONFIG_LIBS_PRIVATE%" ""
|
||||
FREETYPE2_PC_IN ${FREETYPE2_PC_IN})
|
||||
endif ()
|
||||
|
||||
set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc")
|
||||
if (EXISTS "${FREETYPE2_PC_IN_NAME}")
|
||||
|
|
Loading…
Reference in New Issue