Archived
1
Fork 0

Move third party libraries to 3rdparty folder

This commit is contained in:
Joshua Goins 2018-11-05 10:26:54 -05:00
parent 2a1575c5cc
commit 886e488a26
9 changed files with 120 additions and 102 deletions

2
3rdparty/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,2 @@
add_subdirectory(nlohmann)
add_subdirectory(stb)

4
3rdparty/nlohmann/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,4 @@
add_library(nlohmann INTERFACE)
target_include_directories(nlohmann INTERFACE include)
add_library(nlohmann::json ALIAS nlohmann)

5
3rdparty/stb/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,5 @@
add_library(stb
src/stb.c)
target_include_directories(stb PUBLIC include)
add_library(stb::stb ALIAS stb)

2
3rdparty/stb/src/stb.c vendored Normal file
View file

@ -0,0 +1,2 @@
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"

View file

@ -3,6 +3,8 @@ project(Graph)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
add_subdirectory(3rdparty)
include(cmake/BuildShaders.cmake)
include(cmake/CopyData.cmake)
@ -22,7 +24,13 @@ add_executable(Graph
src/worldpass.cpp
src/postpass.cpp
src/dofpass.cpp)
target_link_libraries(Graph PUBLIC SDL2::SDL2 SDL2::SDL2main Vulkan::Vulkan assimp::assimp)
target_link_libraries(Graph PUBLIC
SDL2::SDL2
SDL2::SDL2main
Vulkan::Vulkan
assimp::assimp
nlohmann::json
stb::stb)
target_include_directories(Graph PUBLIC include)
add_shaders(Graph

View file

@ -2,9 +2,7 @@
#include <array>
#include <glm/glm.hpp>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include <stb_image.h>
#include "renderer.h"

View file

@ -3,7 +3,7 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <json.hpp>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
@ -15,7 +15,6 @@
#include "light.h"
#include "camera.h"
#include "cinematic.h"
#include "json.hpp"
SDL_Window* window = nullptr;
Renderer* renderer = nullptr;