Skip to content

Commit 1d07289

Browse files
committed
Merge branch 'dll-naming' of https://github.com/garethsb-sony/cpprestsdk into garethsb-sony-dll-naming
2 parents 6ebb942 + c744440 commit 1d07289

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Release/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ else()
3232
set(BUILD_SAMPLES ON CACHE BOOL "Build sample applications.")
3333
endif()
3434

35+
if(WIN32)
36+
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Default filename postfix for libraries under configuration DEBUG")
37+
endif()
38+
3539
if(ANDROID)
3640
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "Link against boost statically.")
3741
else()

Release/src/CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,18 @@ elseif(WINDOWS_STORE)
215215
endif()
216216

217217
if(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()
220230
elseif(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)

0 commit comments

Comments
 (0)