From 7b570feed42976a6e787d79a70aaf8e667745e58 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 14 Nov 2024 12:34:18 +0800 Subject: Correct include dir for libslang (#5539) This stops adding the repo root to the include path for anything linking with slang. This enabled a bunch of convenient includes, but might lead to confusing behavior for anyone including slang. Not to mention differences including it from an install vs source. Co-authored-by: Yong He --- cmake/LLVM.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake') diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake index e0b7d6241..3c7c1b543 100644 --- a/cmake/LLVM.cmake +++ b/cmake/LLVM.cmake @@ -79,6 +79,10 @@ function(fetch_or_build_slang_llvm) LINK_WITH_PRIVATE core compiler-core llvm-dep clang-dep # We include slang.h, but don't need to link with it INCLUDE_FROM_PRIVATE slang + # We include tools/slang-test/filecheck.h, but don't need to link + # with it and it might not be a target if SLANG_ENABLE_TESTS is + # false, so just include the directory manually here + INCLUDE_DIRECTORIES_PRIVATE ${slang_SOURCE_DIR}/tools # This uses the SLANG_DLL_EXPORT macro from slang.h, so make sure to set # SLANG_DYNAMIC and SLANG_DYNAMIC_EXPORT EXPORT_MACRO_PREFIX SLANG -- cgit v1.2.3