From b6f315a539d5e4c9bf11a5bf911d36c8cecc6df1 Mon Sep 17 00:00:00 2001 From: 4VRDriver <44267643+4VRDriver@users.noreply.github.com> Date: Fri, 4 Sep 2020 00:31:12 +0200 Subject: [PATCH] Add libassimp to project --- CMakeLists.txt | 6 +++++- Camera.cpp | 3 --- Camera.h | 2 ++ lib/CMakeLists.txt | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ff31f6..1632fa6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 3.10) project(Fall-Fever) +set(OpenGL_GL_PREFERENCE "GLVND") + find_package(glfw3 3.3 REQUIRED) +find_package(OpenGL REQUIRED) add_subdirectory(${PROJECT_SOURCE_DIR}/lib) @@ -28,7 +31,8 @@ target_link_libraries( glfw glad stb - GL + ${OPENGL_LIBRARIES} + assimp ) target_compile_options(Fall-Fever PRIVATE -Wall -Wextra -pedantic) diff --git a/Camera.cpp b/Camera.cpp index 02140a3..e8cd195 100644 --- a/Camera.cpp +++ b/Camera.cpp @@ -1,9 +1,6 @@ #include "Camera.h" #include "eventActions.h" -#include -#include - Camera::Camera(float fov, int width, int height) { this->fov = fov; viewMatrix = glm::mat4(1.0f); diff --git a/Camera.h b/Camera.h index 1d05ba0..74de23b 100644 --- a/Camera.h +++ b/Camera.h @@ -1,6 +1,8 @@ #pragma once #include +#include +#include class Camera { diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index c33801e..4d98bfc 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,3 +1,4 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glad) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/stb) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glm) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/assimp)