From 1fe626c4da14fef6cf45b95e48a438e0f93a499e Mon Sep 17 00:00:00 2001 From: mdavidsaver Date: Fri, 16 Dec 2022 00:34:25 -0800 Subject: [PATCH] Allow CLI override of CMAKE_DEBUG_POSTFIX (#1391) Allows cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX= for a debug build with the regular library names. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07afc7677b..a4b54d4625 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,9 @@ if(NOT CMAKE_BUILD_TYPE) endif() string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) -set(CMAKE_DEBUG_POSTFIX d) +if(NOT DEFINED CMAKE_DEBUG_POSTFIX) + set(CMAKE_DEBUG_POSTFIX d) +endif() set(EVENT__LIBRARY_TYPE DEFAULT CACHE STRING "Set library type to SHARED/STATIC/BOTH (default SHARED for MSVC, otherwise BOTH)")