mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-23 04:47:49 +08:00
6a08b7835e
- Add missing vcpkg_fixup_pkgconfig(), which was detected in https://github.com/microsoft/vcpkg/pull/12151 - Fix debug POSTFIX in pugixml.pc file using pugixml-v1.10_fix_debug_pkgconfig.patch based on upstream: https://github.com/zeux/pugixml/pull/363 This results in the following contents of pugixml.pc: Release: Libs: -L${libdir} -lpugixml Debug: Libs: -L${libdir} -lpugixml_d
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index f043962..b281cba 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -94,6 +94,16 @@ install(TARGETS ${LIBRARY} EXPORT pugixml-config
|
|
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX})
|
|
install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
|
|
|
|
+if (USE_POSTFIX)
|
|
+ if(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
|
+ set(LIB_POSTFIX "_r")
|
|
+ elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel)
|
|
+ set(LIB_POSTFIX "_m")
|
|
+ elseif(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
+ set(LIB_POSTFIX "_d")
|
|
+ endif()
|
|
+endif()
|
|
+
|
|
configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
|
|
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
|
|
|
|
diff --git a/scripts/pugixml.pc.in b/scripts/pugixml.pc.in
|
|
index f9c3fd4..7958774 100644
|
|
--- a/scripts/pugixml.pc.in
|
|
+++ b/scripts/pugixml.pc.in
|
|
@@ -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@
|