Computergraphik_Hopp/Code/CMakeLists.txt

38 lines
1.4 KiB
Text
Raw Permalink Normal View History

2018-10-17 12:50:35 +02:00
cmake_minimum_required (VERSION 3.8)
2018-11-14 13:59:22 +01:00
project("Computergraphik")
2018-10-17 15:08:44 +02:00
if (CMAKE_COMPILER_IS_GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
2018-10-17 12:50:35 +02:00
endif()
2018-11-14 13:59:22 +01:00
set(OpenGL_GL_PREFERENCE "GLVND")
2018-10-17 12:50:35 +02:00
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
2018-11-14 13:59:22 +01:00
# Use legacy include_directories because we want to link this against each target.
include_directories(${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
2018-10-31 13:59:10 +01:00
add_executable (hello_world helloWorld.c)
2018-10-24 15:03:05 +02:00
target_link_libraries(hello_world ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
2018-10-31 13:59:10 +01:00
add_executable (culling template_culling.c)
2018-10-24 15:03:05 +02:00
target_link_libraries(culling ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
2018-10-31 13:59:10 +01:00
add_executable (koordinatensystem template_koordinatensystemUndPunkte.c)
2018-10-24 15:03:05 +02:00
target_link_libraries(koordinatensystem ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
2018-10-24 15:45:27 +02:00
target_link_libraries(koordinatensystem m) # Math library
2018-10-31 13:59:25 +01:00
add_executable (mesh template_meshVisualisierung.c)
target_link_libraries(mesh ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
2018-11-14 15:54:26 +01:00
add_executable (mesh_shading template_meshVisualisierung_projektion_depthBuffer_aa.c)
target_link_libraries(mesh_shading ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
2018-11-21 14:42:08 +01:00
add_executable (mesh_beleuchtung template_meshVisualisierung_beleuchtung.c)
target_link_libraries(mesh_beleuchtung ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
2018-11-28 15:30:34 +01:00
add_executable (textur template_meshVisualisierung_textur.c)
target_link_libraries(textur ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})