aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2020-07-15 14:05:14 -0700
committerGitHub <noreply@github.com>2020-07-15 14:05:14 -0700
commit22401bafaff996baecfb694ddc754855e184d377 (patch)
tree76b46dc9b431cfdf45b4f37b8a9d92d30f020b38
parentd58115e581f8cd8ca3e661182425d9e22941b7c3 (diff)
parent8b074b171f6d9ff74168bece825bbe18930e6ee0 (diff)
downloadpugixml-22401bafaff996baecfb694ddc754855e184d377.zip
pugixml-22401bafaff996baecfb694ddc754855e184d377.tar.gz
pugixml-22401bafaff996baecfb694ddc754855e184d377.tar.bz2
Merge pull request #363 from c72578/2020-07-15_Fix_pkgconfig_lib_postfix
Fix debug postfix in pkgconfig file
-rw-r--r--CMakeLists.txt10
-rw-r--r--scripts/pugixml.pc.in2
2 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06e7662..fda789c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
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@