Created
October 23, 2016 11:19
-
-
Save half2me/828e13ad02629475a798ecb1e002501b to your computer and use it in GitHub Desktop.
Mac Cmake file for graphics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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