From 9bea093a39b797a204e598189f9fae6f165550fb Mon Sep 17 00:00:00 2001 From: garethsb-sony Date: Thu, 9 Nov 2017 09:27:50 +0000 Subject: [PATCH] Patch to get e.g. "cpprest140d_2_10.dll" as described in Microsoft/cpprestsdk#577 --- Release/src/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt index be53a53305..927e98be0f 100644 --- a/Release/src/CMakeLists.txt +++ b/Release/src/CMakeLists.txt @@ -216,8 +216,18 @@ elseif(WINDOWS_STORE) endif() if(WIN32) - set_target_properties(cpprest PROPERTIES - OUTPUT_NAME "cpprest_${CPPREST_VERSION_MAJOR}_${CPPREST_VERSION_MINOR}") + string(SUBSTRING ${CMAKE_VS_PLATFORM_TOOLSET} 1 -1 TOOLSET) + set(CPPREST_VERSION_POSTFIX "_${CPPREST_VERSION_MAJOR}_${CPPREST_VERSION_MINOR}") + foreach(CFG ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER ${CFG} CFG) + get_target_property(CFG_POSTFIX cpprest ${CFG}_POSTFIX) + if (NOT CFG_POSTFIX) + # forget "NOTFOUND" + set(CFG_POSTFIX) + endif() + set_target_properties(cpprest PROPERTIES + ${CFG}_POSTFIX "${TOOLSET}${CFG_POSTFIX}${CPPREST_VERSION_POSTFIX}") + endforeach() elseif(ANDROID) # Do not use SOVERSION on android. It is completely unsupported (and causes problems). # Perhaps revisit in the future? (NDK r9d, 8/7/14)