-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
82 lines (60 loc) · 1.67 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
cmake_minimum_required(VERSION 3.14.7)
project(mapgen)
find_package(Qt5 REQUIRED COMPONENTS Widgets)
find_package(OpenGL REQUIRED COMPONENTS OpenGL)
include(FetchContent)
FetchContent_Declare(nodeeditor
URL "https://github.com/tay10r/nodeeditor/archive/master.zip")
FetchContent_MakeAvailable(nodeeditor)
FetchContent_Declare(glm
URL "https://github.com/g-truc/glm/archive/master.zip")
FetchContent_MakeAvailable(glm)
add_library(mapgen
core/Backend.h
core/Backend.cpp
core/Camera.h
core/Camera.cpp
core/CpuBackend.h
core/CpuBackend.cpp
core/IR.h
core/IR.cpp)
target_include_directories(mapgen PUBLIC "${PROJECT_SOURCE_DIR}")
target_compile_features(mapgen PUBLIC cxx_std_17)
target_link_libraries(mapgen PUBLIC glm OpenGL::OpenGL)
set(node_data_models
gui/ArithModels.h
gui/ArithModels.cpp
gui/CoordinatesModel.h
gui/CoordinatesModel.cpp
gui/ConstantsModels.h
gui/ConstantsModels.cpp
gui/OutputModels.h
gui/OutputModels.cpp
gui/TrigModels.h
gui/TrigModels.cpp)
add_executable(mapgen_gui
main.cpp
gui/BackendUpdater.h
gui/BackendUpdater.cpp
gui/ExprNodeData.h
gui/ExprNodeData.cpp
gui/Editor.h
gui/Editor.cpp
gui/MenuBar.h
gui/MenuBar.cpp
gui/SceneView.h
gui/SceneView.cpp
gui/Workspace.h
gui/Workspace.cpp
${node_data_models})
set_target_properties(mapgen_gui
PROPERTIES
OUTPUT_NAME mapgen
AUTOMOC ON)
target_link_libraries(mapgen_gui PRIVATE Qt5::Widgets NodeEditor::nodes mapgen)
if(NOT MSVC)
target_compile_options(mapgen PRIVATE -Wall -Wextra -Werror -Wfatal-errors)
target_compile_options(mapgen_gui PRIVATE -Wall -Wextra -Werror -Wfatal-errors)
endif(NOT MSVC)
add_subdirectory(tests)
enable_testing()