Skip to content

Instantly share code, notes, and snippets.

@half2me
Created October 23, 2016 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save half2me/828e13ad02629475a798ecb1e002501b to your computer and use it in GitHub Desktop.
Save half2me/828e13ad02629475a798ecb1e002501b to your computer and use it in GitHub Desktop.
Mac Cmake file for graphics
cmake_minimum_required(VERSION 3.6)
project(grafika)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
add_executable(grafika ${SOURCE_FILES})
if (NOT APPLE)
find_package(GLEW REQUIRED)
include_directories($(GLEW_INCLUDE_DIRS))
target_link_libraries(grafika ${GLEW_LIBRARY})
endif (NOT APPLE)
target_link_libraries(grafika ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment