# mkdir build
# cd build
# ccmake ..
# Follow on screen direction (press c to configure, g to generate makefile)
# make
# make &> outputfile
#
# Under OS X
# ccmake -G Xcode ..

# Minimum required version
cmake_minimum_required(VERSION 2.8)

project(glLibC2)

find_package(OpenGL)
find_package(GLU)
find_package(GLUT)

#Variables
set(HEADER_FILES
	glLibEffect/glLibCloth.h
	glLibEffect/glLibFont.h
	glLibEffect/glLibLightVolume.h
	glLibEffect/glLibParticleAttractor.h
	glLibEffect/glLibParticleCollider.h
	glLibEffect/glLibParticleEmitter.h
	glLibEffect/glLibParticleSystem.h
	glLibEffect/glLibPostProcess.h
	glLibExtPhysics/glLibExtPhysics.h
	glLibExtPhysics/glLibExtPhysicsBody.h
	glLibExtPhysics/glLibExtPhysicsWorld.h
	glLibMath/glLibMathArbitraryPrecision.h
	glLibMath/glLibMathDistrib.h
	glLibMath/glLibMathFraction.h
	glLibMath/glLibMathIntersect.h
	glLibMath/glLibMathLA.h
	glLibMath/glLibMathMatrix.h
	glLibMath/glLibMathMisc.h
	glLibMath/glLibMathRandom.h
	glLibMath/glLibMathVec.h
	glLibObjects/glLibObject.h
	glLibObjects/glLibObjectGrid.h
	glLibObjects/glLibObjectLoadOBJ.h
	glLibObjects/glLibObjectMesh.h
	glLibObjects/glLibObjectMeta.h
	glLibObjects/glLibObjectPlane.h
	glLibObjects/glLibObjectRectangularSolid.h
	glLibObjects/glLibObjectsMisc.h
	glLibRender/glLibRenderer.h
	glLibRender/glLibRendererParticle.h
	glLibTexturing/glLibTexture.h
	glLibTexturing/glLibTexture1D.h
	glLibTexturing/glLibTexture2D.h
	glLibTexturing/glLibTexture3D.h
	glLibTexturing/glLibTextureCube.h
	glLibTexturing/glLibTexturing.h
	Misc/file.h
	Misc/SDL_functions.h
	Misc/shader_functions.h
	Misc/string_functions.h
	Tutorials/basic_lighting.h
	Tutorials/cloth.h
	Tutorials/cubemapping.h
	Tutorials/ext_graph.h
	Tutorials/ext_physics.h
	Tutorials/ext_ray_trace.h
	Tutorials/load_obj.h
	Tutorials/normalmapping.h
	Tutorials/particles.h
	Tutorials/postprocessing.h
	Tutorials/shader_drawing.h
	Tutorials/shadowmapping.h
	Tutorials/stencil_shadows.h
	Tutorials/tutorial.h
	glLibError.h
	glLibFBO.h
	glLibInit.h
	glLibLight.h
	glLibLocals.h
	glLibMain.h
	glLibMaterials.h
	glLibMisc.h
	glLibExtAlgorithm/glLibExtAlgGraph.h
	glLibExtAlgorithm/glLibExtAlgOctree.h
	glLibShader.h
	glLibTime.h
	glLibView.h
	glLibWindow.h
	glLibExtRayTracer/glLibExtRayTracer.h
	"Research Sketches/analytical motionblur.h"
	../stdafx.h
	../target_version.h
)
set(SOURCE_FILES 
	glLibEffect/glLibFont.cpp
	glLibEffect/glLibLightVolume.cpp
	glLibEffect/glLibParticleAttractor.cpp
	glLibEffect/glLibParticleCollider.cpp
	glLibEffect/glLibParticleEmitter.cpp
	glLibEffect/glLibParticleSystem.cpp
	glLibEffect/glLibPostProcess.cpp
	glLibMath/glLibMathMatrix.cpp
	glLibMath/glLibMathMisc.cpp
	glLibMath/glLibMathRandom.cpp
	glLibMath/glLibMathVec.cpp
	glLibObjects/glLibObject.cpp
	glLibObjects/glLibObjectGrid.cpp
	glLibObjects/glLibObjectLoadOBJ.cpp
	glLibObjects/glLibObjectMesh.cpp
	glLibObjects/glLibObjectMeta.cpp
	glLibObjects/glLibObjectPlane.cpp
	glLibObjects/glLibObjectRectangularSolid.cpp
	glLibObjects/glLibObjectsMisc.cpp
	glLibRender/glLibRenderer.cpp
	glLibRender/glLibRendererParticle.cpp
	glLibTexturing/glLibTexture.cpp
	glLibTexturing/glLibTexture1D.cpp
	glLibTexturing/glLibTexture2D.cpp
	glLibTexturing/glLibTexture3D.cpp
	glLibTexturing/glLibTextureCube.cpp
	glLibTexturing/glLibTexturing.cpp
	Misc/SDL_functions.cpp
	Misc/shader_functions.cpp
	Misc/string_functions.cpp
	glLibExtAlgorithm/glLibExtAlgGraph.cpp
	glLibError.cpp
	glLibFBO.cpp
	glLibInit.cpp
	glLibLight.cpp
	glLibMisc.cpp
	glLibShader.cpp
	glLibView.cpp
	glLibWindow.cpp
	glLibMaterials.cpp
	../stdafx.cpp
	../Tutorials.cpp
)
set(LIBRARY_FILES
	libGLEW.so
	libSDL.so
	libSDL_image.so
	libSDL_ttf.so
	libGLU.so
)

add_executable(glLibC2
  ${SOURCE_FILES}
  ${HEADER_FILES}
)

target_link_libraries(glLibC2 ${LIBRARY_FILES})