diff --git a/CMakeLists.txt b/CMakeLists.txt index 9483ccb94..998674ecf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,6 +394,9 @@ endif() if (MSVC) option(LWS_MSVC_STATIC_RUNTIME "Link to static MSVC runtime" OFF) endif() +if (WIN32) + option(LWS_APPEND_DEBUG_SUFFIX_D "Append 'd' to library name when CMAKE_BUILD_TYPE=Debug" OFF) +endif() # # to use miniz, enable both LWS_WITH_ZLIB and LWS_WITH_MINIZ diff --git a/READMEs/README.coding.md b/READMEs/README.coding.md index 153f19513..3af6e522f 100644 --- a/READMEs/README.coding.md +++ b/READMEs/README.coding.md @@ -31,7 +31,7 @@ one after the other and gets the same benefit from the same code. Isolating and collating the protocol code in one place also makes it very easy to maintain and understand. -So it if highly recommended you put your protocol-specific code into the +So it is highly recommended you put your protocol-specific code into the form of a "plugin" at the source level, even if you have no immediate plan to use it dynamically-loaded. diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index c39afc473..6f18b0fbd 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -190,6 +190,10 @@ if (LWS_WITH_STATIC) OUTPUT_NAME websockets_static) endif() + if (LWS_APPEND_DEBUG_SUFFIX_D) + set_target_properties(websockets PROPERTIES DEBUG_POSTFIX d) + endif() + endif() if (LWS_WITH_SHARED) @@ -240,6 +244,10 @@ if (LWS_WITH_SHARED) endif() endif() + if (LWS_APPEND_DEBUG_SUFFIX_D) + set_target_properties(websockets_shared PROPERTIES DEBUG_POSTFIX d) + endif() + endif() #