summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2023-12-19 00:16:14 +0100
committerGitHub <noreply@github.com>2023-12-18 15:16:14 -0800
commit93b8f68b2e9ddc450ce63f1b6e1806960312d803 (patch)
treed5c9c38efe1e7c86637c4be6157595b44a5c4856 /CMakeLists.txt
parentb6da04424aff71ddba9629c94401a9a897b152a0 (diff)
macos/vulkan support (#3418)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 12 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ea4e1ef8..c2bd54565 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,11 +64,15 @@ auto_option(
NVAPI
"Enable NVAPI usage (Only available for builds targeting Windows)"
)
-auto_option(
- SLANG_ENABLE_XLIB
- X11
- "Build gfx and platform with Xlib to support windowed apps on Linux"
-)
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ auto_option(
+ SLANG_ENABLE_XLIB
+ X11
+ "Build gfx and platform with Xlib to support windowed apps on Linux"
+ )
+else()
+ set(SLANG_ENABLE_XLIB OFF)
+endif()
auto_option(
SLANG_ENABLE_AFTERMATH
Aftermath
@@ -417,6 +421,8 @@ slang_add_target(
core
imgui
$<$<BOOL:${SLANG_ENABLE_XLIB}>:X11::X11>
+ $<$<PLATFORM_ID:Darwin>:-framework Cocoa>
+ $<$<PLATFORM_ID:Darwin>:-framework QuartzCore>
${CMAKE_DL_LIBS}
EXTRA_COMPILE_DEFINITIONS_PRIVATE
$<$<BOOL:${SLANG_ENABLE_XLIB}>:SLANG_ENABLE_XLIB>
@@ -662,6 +668,7 @@ example(examples/cpu-hello-world )
example(examples/gpu-printing )
example(examples/hello-world LINK_WITH_PRIVATE Vulkan-Headers)
example(examples/model-viewer WIN32_EXECUTABLE)
+example(examples/platform-test WIN32_EXECUTABLE)
example(examples/ray-tracing WIN32_EXECUTABLE)
example(examples/ray-tracing-pipeline WIN32_EXECUTABLE)
example(examples/shader-object )