-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (26 loc) · 1.15 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
cmake_minimum_required(VERSION 2.6)
project(executable)
FIND_PACKAGE(GLEW REQUIRED)
FIND_PACKAGE(GLUT REQUIRED)
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE_DIRECTORIES(${GLEW_INCLUDE_DIRS})
LINK_DIRECTORIES(${GLEW_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})
LINK_DIRECTORIES(${GLUT_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
file(
GLOB
source_files
src/*.[ch]pp src/shader*
src/format/*.[ch]pp
)
SET(CMAKE_BUILD_TYPE Debug)
SET(CMAKE_CXX_FLAGS "-O2 -Wall -Wextra" )
SET(CMAKE_CXX_COMPILER "g++")
add_executable(
executable
${source_files}
src/Model.cpp src/Model.h src/LabyModel.cpp src/LabyModel.h src/KeyboardHandler.cpp src/KeyboardHandler.h src/View.cpp src/View.h src/GroundModel.cpp src/GroundModel.h src/State.cpp src/State.h src/GameState.cpp src/GameState.h src/Player.cpp src/Player.h src/GameObject.cpp src/GameObject.h src/GameData.cpp src/GameData.h src/MapObject.cpp src/MapObject.h src/CameraObject.cpp src/CameraObject.h src/Data.cpp src/Data.h)
## Nvidia setting for CPE installs
LINK_DIRECTORIES("/usr/lib/nvidia-331")
target_link_libraries(executable ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES})