diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-15 01:07:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-14 10:07:58 -0700 |
| commit | 5126d58ab2252357014df4136a4a1e07c7c2d5f4 (patch) | |
| tree | 33ff345f9b3dcec0153ba3733aa3e0bbbd14059f /source/slang | |
| parent | 2e08f33386b65502e16eea33613bddf98ab8b440 (diff) | |
Fix release build failure (#5285)
* Fix race condition for building stdlib headers
Fixes https://github.com/shader-slang/slang/issues/5270
* Generalize slangtarget install options
* Install slang-without-embedded-stdlib with generators
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/slang/CMakeLists.txt b/source/slang/CMakeLists.txt index 27600e3f8..cf12e6c24 100644 --- a/source/slang/CMakeLists.txt +++ b/source/slang/CMakeLists.txt @@ -179,8 +179,6 @@ set(slang_build_args # a warning is disabled for a memset boundary check. # everything looked fine and it is unclear why the checking fails $<$<CXX_COMPILER_ID:GNU>:-Wno-error=stringop-overflow> - # slang.h is in the project root, so include that directory in the interface - # for slang INCLUDE_DIRECTORIES_PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/slang-version-header EXPORT_MACRO_PREFIX SLANG EXPORT_TYPE_AS ${SLANG_LIB_TYPE} @@ -198,11 +196,13 @@ set(slang_link_args SPIRV-Headers ) set(slang_interface_args + # slang.h is in the project root, so include that directory in the interface + # for slang INCLUDE_DIRECTORIES_PUBLIC ${slang_SOURCE_DIR} ) set(slang_public_lib_args PUBLIC_HEADERS - ${slang_SOURCE_DIR}/slang*.h + ${slang_SOURCE_DIR}/include/slang*.h ${CMAKE_CURRENT_BINARY_DIR}/slang-version-header/*.h LINK_WITH_PRIVATE $<IF:$<BOOL:${SLANG_EMBED_STDLIB}>,slang-embedded-stdlib,slang-no-embedded-stdlib> @@ -229,6 +229,7 @@ if(NOT SLANG_EMBED_STDLIB) ${slang_link_args} ${slang_interface_args} ${slang_public_lib_args} + INSTALL_COMPONENT generators ) add_library(slang-without-embedded-stdlib ALIAS slang) else() @@ -256,6 +257,9 @@ else() slang-common-objects slang-no-embedded-stdlib slang-embedded-stdlib-source + OUTPUT_DIR generators + FOLDER generators + INSTALL_COMPONENT generators ) slang_add_target( . |
