-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
29 lines (21 loc) · 906 Bytes
/
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
cmake_minimum_required (VERSION 2.8)
project (OpenGL-Basic)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/_install)
###################################
# configure freeglut library #
###################################
message("Configuring freeglut library...")
add_subdirectory(freeglut-3.0.0)
message("Configuring freeglut library - done")
###################################
# configure executable #
###################################
find_package(OpenGL REQUIRED)
if (NOT OPENGL_GLU_FOUND)
message(FATAL_ERROR "OpenGL Utility - GLU library not found")
endif (NOT OPENGL_GLU_FOUND)
include_directories(freeglut-3.0.0/include)
add_executable (app main.cpp)
target_link_libraries (app freeglut ${OPENGL_glu_LIBRARY})
install (TARGETS app RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)