FindSodium.cmake MAKE VS FOLDER SELECTION GENERIC (#471)

This commit is contained in:
Henrik Gaßmann 2017-01-15 14:12:57 +01:00 committed by Frank Denis
parent 3633726d56
commit a81cea2366

View File

@ -104,18 +104,14 @@ elseif (WIN32)
message(FATAL_ERROR "the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake.")
endif()
string(APPEND _PLATFORM_PATH "/$$CONFIG$$")
# this will need to be maintained manually -.-'
if (MSVC_VERSION EQUAL 1600)
string(APPEND _PLATFORM_PATH "/v100")
elseif (MSVC_VERSION EQUAL 1700)
string(APPEND _PLATFORM_PATH "/v110")
elseif (MSVC_VERSION EQUAL 1800)
string(APPEND _PLATFORM_PATH "/v120")
elseif (MSVC_VERSION EQUAL 1900)
string(APPEND _PLATFORM_PATH "/v140")
if (MSVC_VERSION LESS 1900)
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
else()
message(FATAL_ERROR "msvc version ${MSVC_VERSION} is not supported by Findsodium.cmake.")
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
endif()
string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")
if (sodium_USE_STATIC_LIBS)
string(APPEND _PLATFORM_PATH "/static")
else()