1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-25 13:17:46 +00:00

Use system packages for Corrosion, stb and nlohmann

This commit is contained in:
Joshua Goins 2023-09-23 14:52:05 -04:00
parent 2eccb10eda
commit 0fa97a26b7
7 changed files with 21 additions and 36495 deletions

12
cmake/Findstb.cmake Normal file
View file

@ -0,0 +1,12 @@
find_path(
STB_INCLUDE_DIR
NAMES stb_image.h
PATH_SUFFIXES stb
)
find_package_handle_standard_args(stb DEFAULT_MSG STB_INCLUDE_DIR)
if(STB_FOUND)
mark_as_advanced(STB_INCLUDE_DIR)
add_library(stb INTERFACE)
target_include_directories(stb SYSTEM INTERFACE ${STB_INCLUDE_DIR})
add_library(stb::stb ALIAS stb)
endif()

View file

@ -1,13 +1,7 @@
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
# SPDX-License-Identifier: CC0-1.0
FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
GIT_TAG v0.3.5
)
FetchContent_MakeAvailable(Corrosion)
find_package(Corrosion REQUIRED)
FetchContent_Declare(
libphysis

View file

@ -1,3 +1,7 @@
find_package(nlohmann_json REQUIRED)
find_package(stb REQUIRED)
add_library(tinygltf STATIC)
target_sources(tinygltf PRIVATE src/tiny_gltf.cc)
target_include_directories(tinygltf PUBLIC include)
target_include_directories(tinygltf PUBLIC include)
target_link_libraries(tinygltf PUBLIC nlohmann_json::nlohmann_json)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1691,7 +1691,7 @@ class TinyGLTF {
#ifndef TINYGLTF_NO_INCLUDE_JSON
#ifndef TINYGLTF_USE_RAPIDJSON
#include "json.hpp"
#include <nlohmann/json.hpp>
#else
#ifndef TINYGLTF_NO_INCLUDE_RAPIDJSON
#include "document.h"
@ -1710,13 +1710,13 @@ class TinyGLTF {
#ifndef TINYGLTF_NO_STB_IMAGE
#ifndef TINYGLTF_NO_INCLUDE_STB_IMAGE
#include "stb_image.h"
#include <stb/stb_image.h>
#endif
#endif
#ifndef TINYGLTF_NO_STB_IMAGE_WRITE
#ifndef TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE
#include "stb_image_write.h"
#include <stb/stb_image_write.h>
#endif
#endif