cmake_minimum_required (VERSION 3.8) project("Computergraphik") if (CMAKE_COMPILER_IS_GNU) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") endif() set(OpenGL_GL_PREFERENCE "GLVND") find_package(OpenGL REQUIRED) find_package(GLUT REQUIRED) # Use legacy include_directories because we want to link this against each target. include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS}) add_executable (hello_world helloWorld.c) target_link_libraries(hello_world ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}) add_executable (culling template_culling.c) target_link_libraries(culling ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}) add_executable (koordinatensystem template_koordinatensystemUndPunkte.c) target_link_libraries(koordinatensystem ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}) target_link_libraries(koordinatensystem m) # Math library add_executable (mesh template_meshVisualisierung.c) target_link_libraries(mesh ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}) add_executable (mesh_shading template_meshVisualisierung_projektion_depthBuffer_aa.c) target_link_libraries(mesh_shading ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})