Created
October 24, 2014 09:13
-
-
Save toughrogrammer/125ea571450861562809 to your computer and use it in GitHub Desktop.
cmakelists for opengl, glut on mac(practical)
This file contains 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 2.8.4) | |
project(helloworld) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
######################################################### | |
# Include Files | |
######################################################### | |
set(SOURCE_FILES main.cpp Cool.cpp) | |
add_executable(helloworld ${SOURCE_FILES}) | |
IF (APPLE) | |
include_directories (/System/Library/Frameworks) | |
find_library (GLUT_LIBRARY GLUT) | |
find_library (OpenGL_LIBRARY OpenGL) | |
mark_as_advanced (GLUT_LIBRARY | |
OpenGL_LIBRARY) | |
set (EXTRA_LIBS ${GLUT_LIBRARY} ${OpenGL_LIBRARY}) | |
ENDIF (APPLE) | |
target_link_libraries(helloworld ${EXTRA_LIBS}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment