Skip to content

Commit 209aec7

Browse files
committed
implements LWS_APPEND_DEBUG_SUFFIX_D option
now has appropriate rules for shared and static targets
1 parent 99516ea commit 209aec7

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ endif()
394394
if (MSVC)
395395
option(LWS_MSVC_STATIC_RUNTIME "Link to static MSVC runtime" OFF)
396396
endif()
397+
if (WIN32)
398+
option(LWS_APPEND_DEBUG_SUFFIX_D "Append 'd' to library name when CMAKE_BUILD_TYPE=Debug" OFF)
399+
endif()
397400

398401
#
399402
# to use miniz, enable both LWS_WITH_ZLIB and LWS_WITH_MINIZ

READMEs/README.coding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ one after the other and gets the same benefit from the same code.
3131
Isolating and collating the protocol code in one place also makes it very easy
3232
to maintain and understand.
3333

34-
So it if highly recommended you put your protocol-specific code into the
34+
So it is highly recommended you put your protocol-specific code into the
3535
form of a "plugin" at the source level, even if you have no immediate plan to
3636
use it dynamically-loaded.
3737

lib/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ if (LWS_WITH_STATIC)
190190
OUTPUT_NAME websockets_static)
191191
endif()
192192

193+
if (LWS_APPEND_DEBUG_SUFFIX_D)
194+
set_target_properties(websockets PROPERTIES DEBUG_POSTFIX d)
195+
endif()
196+
193197
endif()
194198

195199
if (LWS_WITH_SHARED)
@@ -240,6 +244,10 @@ if (LWS_WITH_SHARED)
240244
endif()
241245
endif()
242246

247+
if (LWS_APPEND_DEBUG_SUFFIX_D)
248+
set_target_properties(websockets_shared PROPERTIES DEBUG_POSTFIX d)
249+
endif()
250+
243251
endif()
244252

245253
#

0 commit comments

Comments
 (0)