OpenGL-JIN/CMakeLists.txt
trotFunky 4da6167836 Added magnitude and normalization
Refactored  `types.h` to `Vectors.h`
2019-10-14 22:36:14 +02:00

43 lines
No EOL
1 KiB
CMake

cmake_minimum_required(VERSION 3.14)
project(tests_opengl)
set(CMAKE_CXX_STANDARD 14)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
if(NOT ${OPENGL_GLU_FOUND})
message(FATAL_ERROR "Glu not installed!")
endif()
add_executable(tests_opengl
src/main.cpp
src/displayers.h
src/displayers.cpp
src/DataHandling/Texture.cpp
src/DataHandling/Texture.h
src/DataHandling/Model3D.cpp
src/DataHandling/Model3D.h
src/Vectors.h
src/KeyStateManager.cpp
src/KeyStateManager.h)
target_link_directories(tests_opengl PRIVATE
src)
target_include_directories(tests_opengl PRIVATE
src)
target_link_libraries(tests_opengl
${OPENGL_LIBRARIES}
${GLUT_LIBRARIES})
target_include_directories(tests_opengl PRIVATE
${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIR})
if (CMAKE_COMPILER_IS_GNUCXX)
target_compile_options(tests_opengl PRIVATE -Wall -Wpedantic -Wextra)
elseif(MSVC)
target_compile_options(tests_opengl PRIVATE /W4)
endif()