-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (48 loc) · 1.12 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
cmake_minimum_required(VERSION 3.7)
project(AEON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
set(THREADS_PREFER_PTHREAD_FLAD ON)
find_package(Threads REQUIRED)
# Find GL and GLX package
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
find_package(SDL2 REQUIRED)
# Adds RESOURCES constant in C++
add_definitions(-DRESOURCES="${CMAKE_SOURCE_DIR}/resources/")
message(${CMAKE_SOURCE_DIR}/resources)
set(Aeon Aeon)
file(GLOB EngineSource
Aeon/*.cpp
Aeon/Core/*.cpp
Aeon/Debug/*.cpp
Aeon/Entity/*.cpp
Aeon/Entity/CoreComponents/*.cpp
Aeon/Input/*.cpp
Aeon/Maths/*.cpp
Aeon/Rendering/*.cpp
Aeon/ThirdParty/*.cpp
Aeon/ThirdParty/*.c
Aeon/ThirdParty/ImGui/*.cpp
)
#temp
file(GLOB GameSource
Game/*.cpp
)
include_directories(${Aeon}
"."
${WinSDK}
${SDL2_INCLUDE_DIRS}
)
add_executable(${Aeon}
${EngineSource}
${GameSource}
)
target_link_libraries(${Aeon}
${WinSDK}
${SDL2_LIBRARIES}
Threads::Threads
OpenGL::GL
)