0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-26 12:41:06 +08:00

Merge pull request #363 from c72578/2020-07-15_Fix_pkgconfig_lib_postfix

Fix debug postfix in pkgconfig file
This commit is contained in:
Arseny Kapoulkine 2020-07-15 14:05:14 -07:00 committed by GitHub
commit 22401bafaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -142,6 +142,16 @@ write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
COMPATIBILITY SameMajorVersion)
if (USE_POSTFIX)
if(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
set(LIB_POSTFIX ${CMAKE_RELWITHDEBINFO_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel)
set(LIB_POSTFIX ${CMAKE_MINSIZEREL_POSTFIX})
elseif(CMAKE_BUILD_TYPE MATCHES Debug)
set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX})
endif()
endif()
configure_file(scripts/pugixml.pc.in pugixml.pc @ONLY)
if (NOT DEFINED PUGIXML_RUNTIME_COMPONENT)

View File

@ -8,4 +8,4 @@ Description: Light-weight, simple and fast XML parser for C++ with XPath support
URL: https://pugixml.org/
Version: @pugixml_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lpugixml
Libs: -L${libdir} -lpugixml@LIB_POSTFIX@