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:
authorWolfgang Stöggl <c72578@yahoo.de>2020-06-17 07:17:06 +0300
committerWolfgang Stöggl <c72578@yahoo.de>2020-06-17 07:22:09 +0300
commit1e384d50313a08dd36a43df1925588741dc33301 (patch)
tree78e0ec0c91d8c0870be6c73e64cb24fe1393b6e1 /CMakeLists.txt
parentfc8967074959a953f9e24f5e31985ef0733ab42a (diff)
Fix debug postfix in pkgconfig file
CMakeLists.txt uses set(CMAKE_DEBUG_POSTFIX "d") to distinguish between debug and release lib. Use this postfix also in the generated tinyxml2.pc file in case of a CMake Debug build. This results in the following contents of tinyxml2.pc - Release: Libs: -L${libdir} -ltinyxml2 - Debug: Libs: -L${libdir} -ltinyxml2d
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f9ab07..7085276 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,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)