make.bat : improve error message while detecting the msvc runtime when using clang

This commit is contained in:
Ray molenkamp 2018-05-28 20:07:24 -06:00
parent 9450792bf2
commit d6a4b23f8b
1 changed files with 6 additions and 1 deletions

View File

@ -31,7 +31,12 @@ endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(MSVC_CLANG On)
file(TO_CMAKE_PATH $ENV{VCToolsRedistDir} MSVC_REDIST_DIR)
set(MSVC_REDIST_DIR $ENV{VCToolsRedistDir})
if (DEFINED MSVC_REDIST_DIR)
file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR)
else()
message("Unable to detect the Visual Studio redist directory, copying of the runtime dlls will not work, try running from the visual studio developer prompt.")
endif()
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_FOLDERS})