Skip to content

Commit

Permalink
Allow CLI override of CMAKE_DEBUG_POSTFIX (libevent#1391)
Browse files Browse the repository at this point in the history
Allows cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX= for a debug build with the regular library names.
  • Loading branch information
mdavidsaver authored Dec 16, 2022
1 parent d8ecb88 commit 1fe626c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down

0 comments on commit 1fe626c

Please sign in to comment.