File tree 3 files changed +26
-2
lines changed
3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ function(set_default_compile_options target)
205
205
$<$<BOOL :${SLANG_ENABLE_FULL_DEBUG_VALIDATION} >:SLANG_ENABLE_FULL_IR_VALIDATION>
206
206
$<$<BOOL :${SLANG_ENABLE_IR_BREAK_ALLOC} >:SLANG_ENABLE_IR_BREAK_ALLOC>
207
207
$<$<BOOL :${SLANG_ENABLE_DX_ON_VK} >:SLANG_CONFIG_DX_ON_VK>
208
+ $<$<STREQUAL :${SLANG_LIB_TYPE} ,STATIC >:STB_IMAGE_STATIC>
208
209
)
209
210
210
211
if (SLANG_ENABLE_ASAN)
Original file line number Diff line number Diff line change @@ -321,6 +321,21 @@ cmake -B build -G Ninja
321
321
cmake --build build -j
322
322
```
323
323
324
+ ## Static linking against libslang
325
+
326
+ If linking against a static ` libslang.a ` you will need to link against some
327
+ dependencies also if you're not already incorporating them into your project.
328
+
329
+ You will need to link against:
330
+
331
+ ```
332
+ ${SLANG_DIR}/build/Release/lib/libslang.a
333
+ ${SLANG_DIR}/build/Release/lib/libcompiler-core.a
334
+ ${SLANG_DIR}/build/Release/lib/libcore.a
335
+ ${SLANG_DIR}/build/external/miniz/libminiz.a
336
+ ${SLANG_DIR}/build/external/lz4/build/cmake/liblz4.a
337
+ ```
338
+
324
339
## Notes
325
340
326
341
[ ^ 1 ] below 3.25, CMake lacks the ability to mark directories as being
Original file line number Diff line number Diff line change @@ -89,11 +89,19 @@ endif()
89
89
90
90
# imgui
91
91
add_library (imgui INTERFACE )
92
- target_include_directories (imgui INTERFACE "${CMAKE_CURRENT_LIST_DIR} /imgui" )
92
+ target_include_directories (
93
+ imgui
94
+ ${system}
95
+ INTERFACE "${CMAKE_CURRENT_LIST_DIR} /imgui"
96
+ )
93
97
94
98
# stb
95
99
add_library (stb INTERFACE )
96
- target_include_directories (stb INTERFACE "${CMAKE_CURRENT_LIST_DIR} /stb" )
100
+ target_include_directories (
101
+ stb
102
+ ${system}
103
+ INTERFACE "${CMAKE_CURRENT_LIST_DIR} /stb"
104
+ )
97
105
98
106
# slang-rhi
99
107
if (SLANG_ENABLE_SLANG_RHI)
You can’t perform that action at this time.
0 commit comments