From 5a02da445aec8e10d4a599673c0faf5078918708 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 7 Mar 2017 16:53:33 -0500 Subject: [PATCH] CMakeLists: Only link LLVM libs against the library LLVM library code is only used within the main dynarmic library, not the test executable. --- src/CMakeLists.txt | 9 +++++++-- tests/CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ca267ce..1865954b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -109,8 +109,13 @@ target_include_directories(dynarmic PUBLIC ../include PRIVATE .) target_compile_options(dynarmic PRIVATE ${DYNARMIC_CXX_FLAGS}) - -target_link_libraries(dynarmic PRIVATE boost fmt-header-only xbyak) +target_link_libraries(dynarmic + PRIVATE + boost + fmt-header-only + xbyak + $<$:${llvm_libs}> +) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") target_compile_definitions(dynarmic PRIVATE FMT_USE_WINDOWS_H=0) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fd6f50fd..bdcc93ca 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,7 +35,7 @@ include(CreateDirectoryGroups) create_directory_groups(${SRCS} ${HEADERS}) add_executable(dynarmic_tests ${SRCS}) -target_link_libraries(dynarmic_tests PRIVATE dynarmic boost catch ${llvm_libs}) +target_link_libraries(dynarmic_tests PRIVATE dynarmic boost catch) target_include_directories(dynarmic_tests PRIVATE . ../src) target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})