Refactored project structure

- Test project is now separated from engine code
 - Engine code can now initialize OpenGL and GLUT correctly
 - Moved vectors and quaternions to a Math subdirectory

Fixed reorder warning
This commit is contained in:
trotFunky 2019-11-02 16:25:02 +01:00
parent 70f76d8030
commit 2bff38edcb
14 changed files with 155 additions and 101 deletions

View file

@ -15,42 +15,5 @@ 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/InputStatus.cpp
src/InputStatus.h
src/Camera.cpp
src/Camera.h
src/Quaternion.cpp
src/Quaternion.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()
add_subdirectory(src)
add_subdirectory(example)