From 113327194d4cf750af6265a560615850a8e7e6fb Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 20 Aug 2025 09:28:30 -0700 Subject: Reduce the dependency to thread library (#8216) Slang compiler doesn't use thread and we should declare the dependency to the thread library when we don't need it. The use of Thread is limited to the tools such as slang-test. --- source/core/CMakeLists.txt | 2 +- source/slang-rt/CMakeLists.txt | 2 +- source/slangc/CMakeLists.txt | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/core/CMakeLists.txt b/source/core/CMakeLists.txt index a8c19f4b5..ee2751a68 100644 --- a/source/core/CMakeLists.txt +++ b/source/core/CMakeLists.txt @@ -4,7 +4,7 @@ slang_add_target( EXPORT_MACRO_PREFIX SLANG EXCLUDE_FROM_ALL USE_EXTRA_WARNINGS - LINK_WITH_PRIVATE miniz lz4_static Threads::Threads ${CMAKE_DL_LIBS} + LINK_WITH_PRIVATE miniz lz4_static ${CMAKE_DL_LIBS} LINK_WITH_PUBLIC unordered_dense::unordered_dense INCLUDE_DIRECTORIES_PUBLIC ${slang_SOURCE_DIR}/source diff --git a/source/slang-rt/CMakeLists.txt b/source/slang-rt/CMakeLists.txt index b915cc5ef..e6a24b84b 100644 --- a/source/slang-rt/CMakeLists.txt +++ b/source/slang-rt/CMakeLists.txt @@ -5,7 +5,7 @@ if(SLANG_ENABLE_SLANGRT) # This compiles 'core' again with the SLANG_RT_DYNAMIC_EXPORT macro defined EXTRA_SOURCE_DIRS ${slang_SOURCE_DIR}/source/core USE_EXTRA_WARNINGS - LINK_WITH_PRIVATE miniz lz4_static Threads::Threads ${CMAKE_DL_LIBS} + LINK_WITH_PRIVATE miniz lz4_static ${CMAKE_DL_LIBS} LINK_WITH_PUBLIC unordered_dense::unordered_dense EXPORT_MACRO_PREFIX SLANG_RT INCLUDE_DIRECTORIES_PUBLIC ${slang_SOURCE_DIR}/include diff --git a/source/slangc/CMakeLists.txt b/source/slangc/CMakeLists.txt index 6692385ba..d27f5040e 100644 --- a/source/slangc/CMakeLists.txt +++ b/source/slangc/CMakeLists.txt @@ -13,7 +13,6 @@ if(SLANG_ENABLE_SLANGC) LINK_WITH_PRIVATE core slang - Threads::Threads ${SLANG_GLSL_MODULE_DEPENDENCY} INSTALL EXPORT_SET_NAME SlangTargets -- cgit v1.2.3