Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/CMakeLists.txt
2018-11-05 21:12:08 -05:00

62 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.1)
project(Graph)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
add_subdirectory(3rdparty)
include(cmake/BuildShaders.cmake)
include(cmake/CopyData.cmake)
set(CMAKE_CXX_STANDARD 14)
find_package(SDL2 REQUIRED)
find_package(Vulkan REQUIRED)
find_package(assimp REQUIRED)
find_package(glm REQUIRED)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DDEBUG)
endif()
message(STATUS ${SDL2_INCLUDE_DIR})
add_executable(Graph
src/main.cpp
src/renderer.cpp
src/worldpass.cpp
src/postpass.cpp
src/dofpass.cpp
src/imguipass.cpp)
target_link_libraries(Graph
PUBLIC
SDL2::SDL2
SDL2::SDL2main
Vulkan::Vulkan
${ASSIMP_LIBRARIES}
nlohmann::json
stb::stb
imgui::imgui)
target_include_directories(Graph
PUBLIC
include
PRIVATE
${ASSIMP_INCLUDE_DIR})
if(UNIX)
add_shaders(Graph
shaders/mesh.vert
shaders/mesh.frag
shaders/post.vert
shaders/post.frag
shaders/dof.vert
shaders/dof.frag
shaders/imgui.vert
shaders/imgui.frag)
endif()
add_data(Graph
data/suzanne.obj
data/test.cim
data/bokeh.png
data/scene.obj)