Browse Source

Add "d" library suffix for debug builds

Brad Anderson 8 years ago
parent
commit
9333cfd394
1 changed files with 6 additions and 3 deletions
  1. 6 3
      CMakeLists.txt

+ 6 - 3
CMakeLists.txt

@@ -7,9 +7,9 @@ IF(BIICODE)
 ENDIF(BIICODE)
 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
 cmake_policy(VERSION 2.6)
-if(POLICY CMP0063)
-	cmake_policy(SET CMP0063 OLD)
-endif()
+if(POLICY CMP0063)
+	cmake_policy(SET CMP0063 OLD)
+endif()
 
 project(tinyxml2)
 include(GNUInstallDirs)
@@ -51,6 +51,9 @@ option(BUILD_STATIC_LIBS "build as static library" OFF)
 set(CMAKE_CXX_VISIBILITY_PRESET hidden)
 set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
 
+# to distinguish between debug and release lib
+set(CMAKE_DEBUG_POSTFIX "d")
+
 if(BUILD_SHARED_LIBS)
 add_library(tinyxml2 SHARED tinyxml2.cpp tinyxml2.h)