This repository has been archived by the owner on Jan 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
77 lines (64 loc) · 1.74 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
cmake_minimum_required(VERSION 3.7)
project(mens_et_manus)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
set(CMAKE_CXX_STANDARD 20)
set(SOURCE_DIR src)
set(INCLUDE_DIR include)
set(SOURCE_FILENAMES
main.cpp
Engine.cpp
Window.cpp
Shader.cpp
Texture.cpp
LuaFile.cpp
Mod.cpp
Cam.cpp
Map.cpp
Config.cpp
Logger.cpp
Tile.cpp
routines/RoutineFactory.cpp
routines/Splash.cpp
routines/MainMenu.cpp
routines/Game.cpp
lua_binders/buffer_lua.cpp
lua_binders/log_lua.cpp
lua_binders/nk_lua.cpp
lua_binders/game_lua.cpp
lua_binders/modlist_lua.cpp
auxiliary/primitives.cpp
auxiliary/util.cpp
lib/glad.c
lib/nuklear.cpp
)
include(prepend)
prepend(SOURCE_FILES ${SOURCE_DIR} ${SOURCE_FILENAMES})
add_executable(mens_et_manus ${SOURCE_FILES})
if(WIN32)
set(CMAKE_EXE_LINKER_FLAGS " -static -Wl,-subsystem,console")
endif(WIN32)
set(ENV{LUA_DIR} lib/lua)
set(SDL2_PATH lib/SDL2)
set(SDL2_IMAGE_PATH lib/SDL2_image)
find_package(Lua REQUIRED)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(OpenGL REQUIRED)
target_include_directories(mens_et_manus PUBLIC
${INCLUDE_DIR}
${LUA_INCLUDE_DIR}
${SDL2_INCLUDE_DIR}
${SDL2_IMAGE_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR}
)
target_link_libraries(mens_et_manus
stdc++fs
${LUA_LIBRARIES}
${SDL2_LIBRARY}
${SDL2_IMAGE_LIBRARY}
${OPENGL_LIBRARIES}
)
if (NOT WIN32)
target_link_libraries(mens_et_manus dl)
endif(NOT WIN32)