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.
This commit is contained in:
mdavidsaver 2022-12-16 00:34:25 -08:00 committed by GitHub
parent d8ecb88f12
commit 1fe626c4da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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)")