From 88861341563b13b1c5d6ffb959df48b7546b1346 Mon Sep 17 00:00:00 2001 From: Sztergbaum Roman Date: Sat, 14 Sep 2019 15:41:57 +0200 Subject: [PATCH] fix(compilation): clang compilation on windows When using LLVM-clang on Windows which share the same ABI as `MSVC` (that means clang is able to use MSVC compiled DLL) the CMake library path was not updated resulting on not finding dependencies. Command line: `cmake -G "Visual Studio 16 2019" -A x64 -T "ClangCl" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" ../` Can be great to add it to CI on appveyor too. --- src/SFML/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SFML/CMakeLists.txt b/src/SFML/CMakeLists.txt index 25a5bb1c7..0014abff1 100644 --- a/src/SFML/CMakeLists.txt +++ b/src/SFML/CMakeLists.txt @@ -13,7 +13,7 @@ if (SFML_OS_WINDOWS) set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-mingw/x64") set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/bin/x64") endif() - elseif(SFML_COMPILER_MSVC) + elseif(SFML_COMPILER_MSVC OR SFML_COMPILER_CLANG) if(SFML_MSVC_VERSION LESS 14) if(ARCH_32BITS) set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc/x86")