-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
43 lines (38 loc) · 1.53 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
cmake_minimum_required (VERSION 2.6)
project (voronoi-3d)
list( APPEND CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS} -g -ftest-coverage -fprofile-arcs")
#########################################################
# FIND GLEW
#########################################################
find_package (GLEW REQUIRED)
include_directories (${GLEW_INCLUDE_DIRS})
link_directories (${GLEW_LIBRARY_DIRS})
if (NOT GLEW_FOUND)
message (ERROR "GLEW not found!")
endif (NOT GLEW_FOUND)
#########################################################
# FIND GLUT
#########################################################
find_package (GLUT REQUIRED)
include_directories (${GLUT_INCLUDE_DIRS})
link_directories (${GLUT_LIBRARY_DIRS})
if (NOT GLUT_FOUND)
message (ERROR "GLUT not found!")
endif (NOT GLUT_FOUND)
#########################################################
# FIND OPENGL
#########################################################
find_package (OpenGL REQUIRED)
include_directories (${OpenGL_INCLUDE_DIRS})
link_directories (${OpenGL_LIBRARY_DIRS})
if (NOT OPENGL_FOUND)
message (ERROR "OPENGL not found!")
endif (NOT OPENGL_FOUND)
file(GLOB SRCS src/*.cpp)
file(GLOB HDRS include/*.h)
include_directories("include")
add_executable (${PROJECT_NAME} ${SRCS} ${HDRS} ${ESGIGL_HDRS} ${ESGIGL_SRCS} ${ESGIGL_COMMON})
########################################################
# Linking & stuff
#########################################################
target_link_libraries (${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} -lglut -lGLU -lGL)