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.
This commit is contained in:
Sztergbaum Roman 2019-09-14 15:41:57 +02:00 committed by Lukas Dürrenberger
parent 2eb70c6537
commit 8886134156

View File

@ -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/libs-mingw/x64")
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/bin/x64") set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/bin/x64")
endif() endif()
elseif(SFML_COMPILER_MSVC) elseif(SFML_COMPILER_MSVC OR SFML_COMPILER_CLANG)
if(SFML_MSVC_VERSION LESS 14) if(SFML_MSVC_VERSION LESS 14)
if(ARCH_32BITS) if(ARCH_32BITS)
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc/x86") set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc/x86")