2019-09-24 09:34:53 +02:00
|
|
|
cmake_minimum_required(VERSION 3.14)
|
2019-11-01 18:22:43 +01:00
|
|
|
|
|
|
|
if(DEFINED ENV{VCPKG_ROOT})
|
|
|
|
set(VCPKG_TARGET_TRIPLET "x64-windows")
|
|
|
|
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
|
|
|
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
|
|
|
CACHE STRING "")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-09-24 09:34:53 +02:00
|
|
|
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
|
2019-10-06 20:12:53 +02:00
|
|
|
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
|
2019-10-14 22:36:08 +02:00
|
|
|
src/Vectors.h
|
2019-10-28 23:45:44 +01:00
|
|
|
src/InputStatus.cpp
|
|
|
|
src/InputStatus.h
|
|
|
|
src/Camera.cpp
|
|
|
|
src/Camera.h
|
|
|
|
src/Quaternion.cpp
|
|
|
|
src/Quaternion.h)
|
2019-10-06 20:12:53 +02:00
|
|
|
|
|
|
|
target_link_directories(tests_opengl PRIVATE
|
|
|
|
src)
|
|
|
|
|
|
|
|
target_include_directories(tests_opengl PRIVATE
|
|
|
|
src)
|
2019-09-24 09:34:53 +02:00
|
|
|
|
|
|
|
target_link_libraries(tests_opengl
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
${GLUT_LIBRARIES})
|
|
|
|
|
|
|
|
target_include_directories(tests_opengl PRIVATE
|
|
|
|
${OPENGL_INCLUDE_DIR}
|
2019-10-12 15:01:38 +02:00
|
|
|
${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()
|