-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (50 loc) · 1.44 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
cmake_minimum_required(VERSION 2.8)
#specify project
project( WombatVsChicken )
SET(CMAKE_CXX_FLAGS "-std=c++14")
# The following folder will be included
include_directories(${PROJECT_SOURCE_DIR})
add_subdirectory(external)
add_subdirectory(glm)
INCLUDE(FindPkgConfig)
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
include_directories(
external/glew/include/
RenderAbstraction
glm
${SDL2_INCLUDE_DIRS}
${SDL2IMAGE_INCLUDE_DIRS}
)
set(ALL_LIBS
${OPENGL_LIBRARY}
GLEW_1130
)
add_definitions(
-DTW_STATIC
-DTW_NO_LIB_PRAGMA
-DTW_NO_DIRECT3D
-DGLEW_STATIC
-D_CRT_SECURE_NO_WARNINGS
)
file(COPY ${CMAKE_SOURCE_DIR}/shader DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_SOURCE_DIR}/media DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_executable( game ${PROJECT_SOURCE_DIR}/main.cpp
RenderAbstraction/Shader
RenderAbstraction/VertexArray
RenderAbstraction/RenderContext
RenderAbstraction/Texture
RenderAbstraction/RenderAbstraction
RenderAbstraction/FrameBuffer
Camera/Camera
Input/Input
Level/HeightMap
Player
IGlobalRenderable
PowerUp
Bullet
Enemy
)
target_link_libraries(game
${ALL_LIBS} ${SDL2_LIBRARIES} ${SDL2IMAGE_LIBRARIES}
)