Use DEBUG_POSTFIX instead of CMAKE_DEBUG_POSTFIX

CMAKE_DEBUG_POSTFIX is a global configuration parameter, and
changing it pollutes the configuration space for other projects
that enclose this project.

DEBUG_POSTFIX is better to use since it is a target-specific poperty.

Fixes #1334
Fixes #1268
This commit is contained in:
David Neto
2018-02-26 14:54:16 -05:00
parent ac34e6c950
commit 20074be19a
2 changed files with 4 additions and 2 deletions

View File

@@ -158,6 +158,10 @@ function(cxx_library_with_type name type cxx_flags)
set_target_properties(${name}
PROPERTIES
COMPILE_FLAGS "${cxx_flags}")
# Generate debug library name with a postfix.
set_target_properties(${name}
PROPERTIES
DEBUG_POSTFIX "d")
if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED")
set_target_properties(${name}
PROPERTIES