-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
89 lines (81 loc) · 2.77 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
cmake_minimum_required(VERSION 3.1)
project(Terracotta)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 14)
include(GNUInstallDirs)
add_executable(terracotta
terracotta/assets/AssetCache.cpp
terracotta/assets/AssetCache.h
terracotta/assets/AssetLoader.cpp
terracotta/assets/AssetLoader.h
terracotta/assets/stb_image.h
terracotta/assets/TextureArray.cpp
terracotta/assets/TextureArray.h
terracotta/assets/zip/miniz.cpp
terracotta/assets/zip/miniz.h
terracotta/assets/zip/ZipArchive.cpp
terracotta/assets/zip/ZipArchive.h
terracotta/block/BlockElement.h
terracotta/block/BlockFace.cpp
terracotta/block/BlockFace.h
terracotta/block/BlockModel.cpp
terracotta/block/BlockModel.h
terracotta/block/BlockState.cpp
terracotta/block/BlockState.h
terracotta/block/BlockVariant.h
terracotta/Camera.cpp
terracotta/Camera.h
terracotta/ChatWindow.cpp
terracotta/ChatWindow.h
terracotta/Chunk.cpp
terracotta/Chunk.h
terracotta/Collision.h
terracotta/Collision.cpp
terracotta/Game.cpp
terracotta/Game.h
terracotta/GameWindow.cpp
terracotta/GameWindow.h
terracotta/lib/imgui/imconfig.h
terracotta/lib/imgui/imgui.cpp
terracotta/lib/imgui/imgui.h
terracotta/lib/imgui/imgui_draw.cpp
terracotta/lib/imgui/imgui_impl_glfw.cpp
terracotta/lib/imgui/imgui_impl_glfw.h
terracotta/lib/imgui/imgui_impl_opengl3.cpp
terracotta/lib/imgui/imgui_impl_opengl3.h
terracotta/lib/imgui/imgui_internal.h
terracotta/lib/imgui/imgui_widgets.cpp
terracotta/lib/imgui/imstb_rectpack.h
terracotta/lib/imgui/imstb_textedit.h
terracotta/lib/imgui/imstb_truetype.h
terracotta/main.cpp
terracotta/math/Plane.cpp
terracotta/math/Plane.h
terracotta/math/TypeUtil.h
terracotta/math/volumes/Frustum.cpp
terracotta/math/volumes/Frustum.h
terracotta/PriorityQueue.h
terracotta/Transform.h
terracotta/render/ChunkMesh.cpp
terracotta/render/ChunkMesh.h
terracotta/render/ChunkMeshGenerator.cpp
terracotta/render/ChunkMeshGenerator.h
terracotta/render/Shader.cpp
terracotta/render/Shader.h
terracotta/World.cpp
terracotta/World.h
)
add_definitions(-DGLEW_STATIC -DIMGUI_IMPL_OPENGL_LOADER_GLEW)
find_package(glfw3 REQUIRED)
find_package(GLEW REQUIRED)
find_package(GLM REQUIRED)
find_package(mclib REQUIRED)
if (WIN32)
set(GL_LIBRARY opengl32)
else()
set(GL_LIBRARY GL)
set(OTHER_LIBS pthread glfw)
endif()
target_include_directories(terracotta PRIVATE ${MCLIB_INCLUDE_DIR} ${GLFW3_INCLUDE_DIR} ${GLM_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
target_link_libraries(terracotta PRIVATE ${GL_LIBRARY} ${MCLIB_LIBRARY} ${GLFW3_LIBRARY} ${GLEW_LIBRARY} ${OTHER_LIBS})