forked from scilus/dmri-explorer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
58 lines (44 loc) · 1.51 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
57
58
# dmri-explorer build system entry-point
if(UNIX)
# set generator to makefile
set(CMAKE_GENERATOR "Unix Makefiles")
elseif(WIN32)
# use zlib binaries, built and exported using vcpkg
set(CMAKE_TOOLCHAIN_FILE "deps/zlib/scripts/buildsystems/vcpkg.cmake")
# force generator platform to x64 on Windows
# (for use with MSVC)
set(CMAKE_GENERATOR_PLATFORM "x64")
endif()
cmake_minimum_required(VERSION 3.11)
project(dmriexplorer)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_VERBOSE_MAKEFILE ON)
# glfw include
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory("deps/glfw-3.3.6")
# glad include
add_library(GLAD "deps/glad/src/glad.c")
include_directories("deps/glad/include/")
# nifti i/o library
add_subdirectory("deps/nifti")
include_directories("deps/nifti/include/")
# imgui include
file(GLOB IMGUI_SRC "deps/imgui/src/*.cpp")
add_library(IMGUI ${IMGUI_SRC})
target_link_libraries(IMGUI PRIVATE glfw GLAD)
include_directories("deps/imgui/include/")
add_compile_definitions(IMGUI_IMPL_OPENGL_LOADER_GLAD)
# std image loader include
include_directories("deps/stb/include/")
# glm math library include
include_directories("deps/glm/")
#args parser library include
include_directories("deps/args/")
# get icon images; will be passed on to Engine
file(GLOB DMRI_EXP_ICONS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"icons/*")
set(DMRI_EXP_ICONS_ABS_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory("Engine")