CMakeLists.txt 1.84 KB
Newer Older
Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
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
project(GameApp)
cmake_minimum_required(VERSION 3.4)

set(CMAKE_CXX_STANDARD 14)

find_package(GLEW REQUIRED)
include_directories(${GLEW_INCLUDE_DIRS})
link_directories(${GLEW_LIBRARIES})

find_package(GLUT REQUIRED)
include_directories(${GLUT_INCLUDE_DIR})
link_directories(${GLUT_LIBRARIES})
add_definitions(${GLUT_DEFINITIONS})
if(NOT GLUT_FOUND)
    message(ERROR " GLUT not found!")
endif(NOT GLUT_FOUND)

find_package(OpenGL REQUIRED)
include_directories(${OpenGL_INCLUDE_DIRS})
link_directories(${OpenGL_LIBRARY_DIRS})
add_definitions(${OpenGL_DEFINITIONS})
if(NOT OPENGL_FOUND)
    message(ERROR " OPENGL not found!")
endif(NOT OPENGL_FOUND)



set( INCLUDE
29
        include/Plane.hpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
30
31
32
33
34
35
        include/Camera.hpp
        include/Clock.hpp
        include/FpsCounter.hpp
        include/GameManager.hpp
        include/Input.hpp
        include/SceneObject.hpp
Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
36
37
        include/Character.hpp
        include/Utils.hpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
38
39
        include/Snow.hpp
        include/Text.hpp
40
        include/Minimap.hpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
41
42
43
44
45
        include/IndexBuffer.h
        include/Shader.h
        include/VertexArray.h
        include/VertexBuffer.h
        include/VertexBufferLayout.h
46
        include/Texture.h
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
47
        include/Projection.h
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
48
        include/Skybox.h
Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
49

50
        include/GLErrorHandler.h
Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
51
52
53
        include/stb_image.h
)
set( SRCS
54
        src/Plane.cpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
55
56
57
        src/Camera.cpp
        src/GameManager.cpp
        src/SceneObject.cpp
Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
58
        src/Character.cpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
59
60
        src/Snow.cpp
        src/Text.cpp
61
        src/Minimap.cpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
62
63
64
65
        src/IndexBuffer.cpp
        src/Shader.cpp
        src/VertexArray.cpp
        src/VertexBuffer.cpp
66
        src/Texture.cpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
67
        src/Skybox.cpp
Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
68

69
        src/GLErrorHandler.cpp
Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
70
        src/stb_image.cpp
Håkon Berg Borhaug's avatar
Håkon Berg Borhaug committed
71

Håkon Berg Borhaug's avatar
Init  
Håkon Berg Borhaug committed
72
73
74
75
76
77
78
79
        app/main.cpp


)

add_executable(${PROJECT_NAME} ${INCLUDE} ${SRCS})

target_link_libraries(${PROJECT_NAME} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})