From d6a4b23f8bcbc3076e7d9f2a52c347670188949f Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Mon, 28 May 2018 20:07:24 -0600 Subject: make.bat : improve error message while detecting the msvc runtime when using clang --- build_files/cmake/platform/platform_win32.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build_files') diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 205040ac0cf..3c35851bc5f 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -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}) -- cgit v1.2.3