-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (37 loc) · 1.33 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# FetchContent_MakeAvailable is available since CMake version 3.14
cmake_minimum_required(VERSION 3.14)
# Setting up dlib as an external package
set(HUNTER_PACKAGES imgui ZLIB SDL2)
include(FetchContent)
FetchContent_Declare(SetupHunter GIT_REPOSITORY https://github.com/cpp-pm/gate)
FetchContent_MakeAvailable(SetupHunter)
project(voxel-rt)
set (CMAKE_CXX_STANDARD 17)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-Og")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
find_package(imgui CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(SDL2 REQUIRED)
find_package(OpenGL REQUIRED)
add_subdirectory(lib/modern-opencl/)
add_executable(run-voxel-rt
src/main.cpp
src/imgui_config/imgui_impl_sdl.h
src/imgui_config/imgui_impl_sdl.cpp
src/imgui_config/imgui_impl_opengl2.h
src/imgui_config/imgui_impl_opengl2.cpp
src/io/nrrd_loader.hpp
src/io/nrrd_loader.cpp
src/io/volume_block.hpp
src/io/volume_block.cpp
src/io/image_loader.hpp
src/io/image_loader.cpp
src/io/image.hpp
src/io/image.cpp
)
target_include_directories(run-voxel-rt PRIVATE "${CMAKE_CURRENT_LIST_DIR}/lib/stb/")
target_compile_definitions(run-voxel-rt PRIVATE -DKERNEL_DIR="${CMAKE_CURRENT_LIST_DIR}/kernels/")
target_link_libraries(run-voxel-rt imgui::imgui ZLIB::zlib SDL2::SDL2 OpenGL::GL modern-opencl)