mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 15:12:31 +00:00
build: link against system libs reported by llvm-config
This commit is contained in:
parent
76344a6fc4
commit
62b23f5da5
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ build/
|
||||
build-release/
|
||||
build-windows/
|
||||
build-llvm-5/
|
||||
build-llvm-debug/
|
||||
/.cproject
|
||||
/.project
|
||||
/.settings/
|
||||
|
@ -20,6 +20,11 @@ execute_process(
|
||||
OUTPUT_VARIABLE LLVM_LIBRARIES
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${LLVM_CONFIG_EXE} --system-libs
|
||||
OUTPUT_VARIABLE LLVM_SYSTEM_LIBS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${LLVM_CONFIG_EXE} --libdir
|
||||
OUTPUT_VARIABLE LLVM_LIBDIRS
|
||||
@ -32,14 +37,13 @@ execute_process(
|
||||
|
||||
find_library(LLVM_LIBRARY NAMES LLVM)
|
||||
|
||||
set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
|
||||
|
||||
if(LLVM_LIBRARY)
|
||||
set(LLVM_LIBRARIES ${LLVM_LIBRARY})
|
||||
endif()
|
||||
|
||||
|
||||
set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LLVM DEFAULT_MSG LLVM_LIBRARIES LLVM_INCLUDE_DIR)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user