Skip to content

Instantly share code, notes, and snippets.

@walsvid
Created June 7, 2016 07:41
Show Gist options
  • Save walsvid/355c1617194245f480a2466705f461a1 to your computer and use it in GitHub Desktop.
Save walsvid/355c1617194245f480a2466705f461a1 to your computer and use it in GitHub Desktop.
CMake-Template-OpenGL
cmake_minimum_required(VERSION 3.3)
project(opengltest)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
find_package(GLUT REQUIRED)
include_directories(${GLUT_INCLUDE_DIR})
set(SOURCE_FILES main.c)
add_executable(opengltest ${SOURCE_FILES})
target_link_libraries(CGLab01 ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment