Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leethomason/tinyxml2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Thomason <leethomason@gmail.com>2020-09-17 23:55:47 +0300
committerGitHub <noreply@github.com>2020-09-17 23:55:47 +0300
commit1aeb57d26bc303d5cfa1a9ff2a331df7ba278656 (patch)
tree30e52c0a9eaa6e49c98189ede409b14188bb819b
parenta0ce5527ab0e0f52fde52394aa18e60ecc9d5e88 (diff)
parent1e384d50313a08dd36a43df1925588741dc33301 (diff)
Merge pull request #823 from c72578/2020-06-17_Fix_pkgconfig_lib_postfix
cmake: Fix debug postfix in pkgconfig file
-rw-r--r--CMakeLists.txt3
-rw-r--r--tinyxml2.pc.in2
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2eeefdb..0d43809 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,6 +107,9 @@ endif()
install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT tinyxml2_headers)
+if(CMAKE_BUILD_TYPE MATCHES Debug)
+ set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+endif()
configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT tinyxml2_config)
diff --git a/tinyxml2.pc.in b/tinyxml2.pc.in
index b040b0e..b100f60 100644
--- a/tinyxml2.pc.in
+++ b/tinyxml2.pc.in
@@ -6,5 +6,5 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: TinyXML2
Description: simple, small, C++ XML parser
Version: @GENERIC_LIB_VERSION@
-Libs: -L${libdir} -ltinyxml2
+Libs: -L${libdir} -ltinyxml2@LIB_POSTFIX@
Cflags: -I${includedir}