From ce51c1a7c179fb1e29daffb2b6a2c96746806110 Mon Sep 17 00:00:00 2001 From: Walter Gray Date: Tue, 16 Aug 2016 12:21:18 -0700 Subject: [PATCH] Fixed a problem where d would not be added to debug builds --- standard/StandardProject.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/standard/StandardProject.cmake b/standard/StandardProject.cmake index b5ab499f7..b09a20616 100644 --- a/standard/StandardProject.cmake +++ b/standard/StandardProject.cmake @@ -82,7 +82,11 @@ function(standard_project_preinit) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib PARENT_SCOPE) # Postfix on all debug libraries should be "d" - set(CMAKE_DEBUG_POSTFIX d${CMAKE_DEBUG_POSTFIX} PARENT_SCOPE) + # PARENT_SCOPE causes the variable to not be set locally, and we + # rely on this value in the following loop.... + + set(CMAKE_DEBUG_POSTFIX "d${CMAKE_DEBUG_POSTFIX}") + set(CMAKE_DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} PARENT_SCOPE) # 64-bit installations should suffix with 64 regardless of the CPU type (arm or intel) if(CMAKE_SIZEOF_VOID_P EQUAL 8)