summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62fc0868b..4b0b14d6d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,7 @@ option(SLANG_ENABLE_TESTS "Enable test targets, requires SLANG_ENABLE_GFX, SLANG
option(SLANG_ENABLE_EXAMPLES "Enable example targets, requires SLANG_ENABLE_GFX" ON)
enum_option(
- SLANG_LIB_TYPE
+ SLANG_LIB_TYPE
# Default
SHARED
"How to build the slang lib:"
@@ -458,9 +458,10 @@ if(SLANG_ENABLE_GFX)
core
imgui
$<$<BOOL:${SLANG_ENABLE_XLIB}>:X11::X11>
- $<$<PLATFORM_ID:Darwin>:-framework Cocoa>
- $<$<PLATFORM_ID:Darwin>:-framework QuartzCore>
${CMAKE_DL_LIBS}
+ LINK_WITH_FRAMEWORK
+ Cocoa
+ QuartzCore
EXTRA_COMPILE_DEFINITIONS_PRIVATE
$<$<BOOL:${SLANG_ENABLE_XLIB}>:SLANG_ENABLE_XLIB>
INCLUDE_FROM_PRIVATE gfx
@@ -481,6 +482,9 @@ if(SLANG_ENABLE_GFX)
Vulkan-Headers
$<$<BOOL:${SLANG_ENABLE_XLIB}>:X11::X11>
$<$<BOOL:${SLANG_ENABLE_CUDA}>:CUDA::cudart;CUDA::cuda_driver>
+ LINK_WITH_FRAMEWORK
+ Cocoa
+ QuartzCore
EXTRA_COMPILE_DEFINITIONS_PRIVATE
$<$<BOOL:${SLANG_ENABLE_CUDA}>:GFX_ENABLE_CUDA>
$<$<BOOL:${SLANG_ENABLE_OPTIX}>:GFX_OPTIX>