Permalink
Browse files

Fix linker flags for building with clang on Windows

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
  • Loading branch information...
t-b committed Jul 28, 2016
1 parent ff7d28b commit 41846b467bea58b904e26ce139394f7371ea5870
Showing with 5 additions and 1 deletion.
  1. +5 −1 cmake/FindLibClang.cmake
View
@@ -38,7 +38,11 @@ if (NOT CLANG_LIBS)
if (NOT EXISTS ${CLANG_CLANG_LIB_HACK_CMAKECACHE_DOT_TEXT_BULLSHIT})
find_library(CLANG_LIBS NAMES clang libclang)
if (NOT EXISTS ${CLANG_LIBS})
set (CLANG_LIBS "-L${CLANG_LIBDIR}" "-lclang" "-Wl,-rpath,${CLANG_LIBDIR}")
if (MSVC)
set (CLANG_LIBS "${CLANG_LIBDIR}/libclang.lib")
else()
set (CLANG_LIBS "-L${CLANG_LIBDIR}" "-lclang" "-Wl,-rpath,${CLANG_LIBDIR}")
endif()
endif ()
else ()
set(CLANG_LIBS "${CLANG_LIB_HACK_CMAKECACHE_DOT_TEXT_BULLSHIT}")

0 comments on commit 41846b4

Please sign in to comment.