[Code] Update CMakeLists.txt
This commit is contained in:
parent
8d28fef13d
commit
21d5ac32b8
1 changed files with 7 additions and 4 deletions
|
@ -1,25 +1,28 @@
|
|||
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_include_directories(hello_world PRIVATE ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
|
||||
target_link_libraries(hello_world ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
|
||||
|
||||
add_executable (culling template_culling.c)
|
||||
target_include_directories(culling PRIVATE ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
|
||||
target_link_libraries(culling ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
|
||||
|
||||
add_executable (koordinatensystem template_koordinatensystemUndPunkte.c)
|
||||
target_include_directories(koordinatensystem PRIVATE ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
|
||||
target_link_libraries(koordinatensystem ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
|
||||
target_link_libraries(koordinatensystem m) # Math library
|
||||
|
||||
add_executable (mesh template_meshVisualisierung.c)
|
||||
target_include_directories(mesh PRIVATE ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS})
|
||||
target_link_libraries(mesh ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
|
||||
|
|
Loading…
Reference in a new issue