File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ else()
3232 set (BUILD_SAMPLES ON CACHE BOOL "Build sample applications." )
3333endif ()
3434
35+ if (WIN32 )
36+ set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Default filename postfix for libraries under configuration DEBUG" )
37+ endif ()
38+
3539if (ANDROID)
3640 set (Boost_USE_STATIC_LIBS ON CACHE BOOL "Link against boost statically." )
3741else ()
Original file line number Diff line number Diff line change @@ -215,8 +215,18 @@ elseif(WINDOWS_STORE)
215215endif ()
216216
217217if (WIN32 )
218- set_target_properties (cpprest PROPERTIES
219- OUTPUT_NAME "cpprest_${CPPREST_VERSION_MAJOR} _${CPPREST_VERSION_MINOR} " )
218+ string (SUBSTRING ${CMAKE_VS_PLATFORM_TOOLSET} 1 -1 TOOLSET)
219+ set (CPPREST_VERSION_POSTFIX "_${CPPREST_VERSION_MAJOR} _${CPPREST_VERSION_MINOR} " )
220+ foreach (CFG ${CMAKE_CONFIGURATION_TYPES} )
221+ string (TOUPPER ${CFG} CFG)
222+ get_target_property (CFG_POSTFIX cpprest ${CFG} _POSTFIX)
223+ if (NOT CFG_POSTFIX )
224+ # forget "NOTFOUND"
225+ set (CFG_POSTFIX )
226+ endif ()
227+ set_target_properties (cpprest PROPERTIES
228+ ${CFG} _POSTFIX "${TOOLSET}${CFG_POSTFIX}${CPPREST_VERSION_POSTFIX} " )
229+ endforeach ()
220230elseif (ANDROID)
221231 # Do not use SOVERSION on android. It is completely unsupported (and causes problems).
222232 # Perhaps revisit in the future? (NDK r9d, 8/7/14)
You can’t perform that action at this time.
0 commit comments