-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
71 lines (53 loc) · 1.87 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
cmake_minimum_required(VERSION 3.9)
project(BasicBool)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXE_LINKER_FLAGS -static)
# set output directories for all builds (Debug, Release, etc.)
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${PROJECT_SOURCE_DIR} )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
add_executable(
${PROJECT_NAME}
src/main.cpp
# PLATFORM
src/platform/platform.hpp
src/platform/platform_win32.cpp
src/platform/platform_linux.cpp
# CORE
src/core/logger.hpp
src/core/defines.hpp
src/core/math.hpp
# RENDER
src/render/backend.hpp
src/render/backend.cpp
src/render/shapes.hpp
src/render/shapes.cpp
src/render/text.hpp
src/render/text.cpp
# NODE
src/node/node_system.hpp
src/node/node_system.cpp
src/node/nodes.hpp
src/node/look_and_feel.hpp
# GUI
src/gui/gui.hpp)
target_include_directories(${PROJECT_NAME} PUBLIC src/)
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --my-debug-flags")
target_compile_definitions(${PROJECT_NAME} PUBLIC "$<$<CONFIG:Debug>:BUILD_DEBUG>")
# --- DEPS ---
# OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PRIVATE ${OPENGL_LIBRARIES})
# glad
add_library(glad STATIC
external/glad/src/glad.c
external/glad/include/glad/glad.h
external/glad/include/KHR/khrplatform.h)
target_include_directories(glad PUBLIC external/glad/include)
target_link_libraries(${PROJECT_NAME} PRIVATE glad)
# OPENMP
find_package(OpenMP REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE OpenMP::OpenMP_CXX)
target_include_directories(${PROJECT_NAME} PUBLIC external/stb)