From: mdavidsaver Date: Fri, 16 Dec 2022 08:34:25 +0000 (-0800) Subject: Allow CLI override of CMAKE_DEBUG_POSTFIX (#1391) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fe626c4da14fef6cf45b95e48a438e0f93a499e;p=libevent 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. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 07afc767..a4b54d46 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)")