Skip to content

Commit

Permalink
only substitute lib suffix on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
0u812 committed May 8, 2015
1 parent b80917c commit abb4cb7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmake/FindLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ if (LLVM_CONFIG_EXECUTABLE)
OUTPUT_VARIABLE LLVM_LIBRARIES
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# llvm-config returns .a library names, even on Windows, so manually convert .a -> .lib and remove lib prefix.
STRING(REGEX REPLACE "lib([^/\\]*)\\.a" "\\1.lib" LLVM_LIBRARIES ${LLVM_LIBRARIES})
if(WIN32)
# llvm-config returns .a library names, even on Windows, so manually convert .a -> .lib and remove lib prefix.
STRING(REGEX REPLACE "lib([^/\\]*)\\.a" "\\1.lib" LLVM_LIBRARIES ${LLVM_LIBRARIES})
endif()
# we get a space sep list from llvm-config, make it a cmake ; separated list.
STRING(REGEX REPLACE "[\n\t\r ]+" ";" LLVM_LIBRARIES ${LLVM_LIBRARIES})
message(STATUS "LLVM_LIBRARIES: ${LLVM_LIBRARIES}")
Expand Down

0 comments on commit abb4cb7

Please sign in to comment.