]> granicus.if.org Git - libevent/commitdiff
Allow CLI override of CMAKE_DEBUG_POSTFIX (#1391)
authormdavidsaver <mdavidsaver@gmail.com>
Fri, 16 Dec 2022 08:34:25 +0000 (00:34 -0800)
committerGitHub <noreply@github.com>
Fri, 16 Dec 2022 08:34:25 +0000 (11:34 +0300)
Allows cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX= for a debug build with the regular library names.

CMakeLists.txt

index 07afc7677b844865dbdad1e0186692a7b8978c84..a4b54d4625f3e97e97c773bbff2341a4c8d67176 100644 (file)
@@ -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)")