make.bat : improve error message while detecting the msvc runtime when using clang
authorRay Molenkamp <github@lazydodo.com>
Tue, 29 May 2018 02:07:24 +0000 (20:07 -0600)
committerRay Molenkamp <github@lazydodo.com>
Tue, 29 May 2018 02:07:24 +0000 (20:07 -0600)
build_files/cmake/platform/platform_win32.cmake

index 205040ac0cf2c6434a9d70972f8009448a35ec09..3c35851bc5feb8cdfb75a4b9401c6f9779439af3 100644 (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})