Computergraphik_Hopp/Code/CMakeLists.txt

29 lines
954 B
Text
Raw 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})