This repository has been archived by the owner on Sep 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
89 lines (71 loc) · 2.39 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.15)
project(VoxelThingEditorYeah VERSION "0.1.0" LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin )
set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
set(SRC
src/main.cpp
src/ui/mainwindow.cpp
src/ui/mainwindow.hpp
src/ui/docks/editor4pane.cpp
src/ui/docks/editor4pane.hpp
src/ui/docks/currentblock.cpp
src/ui/docks/currentblock.hpp
src/ui/widgets/renderwidget.cpp
src/ui/widgets/renderwidget.hpp
src/ui/widgets/colorpicker.cpp
src/ui/widgets/colorpicker.hpp
src/ui/widgets/betterslider.cpp
src/ui/widgets/betterslider.hpp
src/ui/widgets/blocktexture.cpp
src/ui/widgets/blocktexture.hpp
src/ui/dialogs/blockproperties.cpp
src/ui/dialogs/blockproperties.hpp
src/ui/dialogs/settingsdialog.cpp
src/ui/dialogs/settingsdialog.hpp
src/ui/dialogs/blocklist.cpp
src/ui/dialogs/blocklist.hpp
src/ui/dialogs/properties.cpp
src/ui/dialogs/properties.hpp
src/world/chunk.cpp
src/world/chunk.hpp
src/world/raycast.cpp
src/world/raycast.hpp
src/world/world.cpp
src/world/world.hpp
src/world/loading/worldformat.cpp
src/world/loading/worldformat.hpp
src/editor/tools.cpp
src/editor/tools.hpp
src/editor/toml.cpp
src/editor/toml.hpp
src/editor/defs.cpp
src/editor/defs.hpp
src/editor/editorstate.cpp
src/editor/editorstate.hpp
src/editor/undo.cpp
src/editor/undo.hpp
src/editor/entity.cpp
src/editor/entity.hpp
src/render/model.cpp
src/render/model.hpp
src/render/texture.cpp
src/render/texture.hpp
)
set(RESOURCES resources/resources.qrc)
# Core, Widgets, Gui, and openGL
find_package(Qt5 REQUIRED COMPONENTS Widgets Core Gui OpenGL)
# OpenGL itself
find_package(OpenGL REQUIRED)
# Configure config.hpp.in
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/src/editor/config.h.in"
"${CMAKE_CURRENT_SOURCE_DIR}/src/editor/config.h"
)
add_executable(${PROJECT_NAME} ${SRC} ${RESOURCES})
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Core Qt5::Gui Qt5::OpenGL OpenGL::GL OpenGL::GLU)
target_include_directories(${PROJECT_NAME} PRIVATE ${QT_INCLUDE}/QtWidgets ${QT_INCLUDE}/QtCore ${QT_INCLUDE}/QtGui ${QT_INCLUDE}/QtOpenGL src)
target_compile_definitions(${PROJECT_NAME} PRIVATE TOML_HEADER_ONLY)