diff options
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 86d91d5..c1f4843 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,16 @@ -add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES) - set(LIBRARIES imgui::imgui nlohmann_json::nlohmann_json Tracy::TracyClient) +set(DEFINES -DNOMINMAX -D_USE_MATH_DEFINES -DVK_NO_PROTOTYPES) + +if(UNIX AND NOT APPLE) + set(DEFINES ${DEFINES} -DLINUX -DVK_USE_PLATFORM_XCB_KHR) +elseif(WIN32) + set(DEFINES ${DEFINES} -DWINDOWS -DVK_USE_PLATFORM_WIN32_KHR) +elseif(APPLE) + set(DEFINES ${DEFINES} -DMACOS -DVK_USE_PLATFORM_METAL_EXT) +endif() + + add_executable( path-tracer main.cpp @@ -18,9 +27,11 @@ add_executable( gltf.cpp compute-renderpass.cpp primitive-renderpass.cpp - ${Tracy_SOURCE_DIR}/TracyClient.cpp + # ${Tracy_SOURCE_DIR}/TracyClient.cpp ) +target_compile_definitions(path-tracer PUBLIC ${DEFINES}) + target_include_directories(path-tracer SYSTEM PUBLIC ${CMAKE_SOURCE_DIR}/thirdparty) target_include_directories(path-tracer PUBLIC ${CMAKE_SOURCE_DIR}/include) |
