summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-09-07 22:42:23 -0400
committerJonathan Bradley <jcb@pikum.xyz>2023-09-07 22:42:23 -0400
commit8f4ccd91072415aa56ab609d1eeafe416b00e0a3 (patch)
tree4c156d3327cc35e0c25791bfb112c81f24d2e7a4
parentf31951f007342a14c8778b323fac012772ec1a67 (diff)
add cgltf
-rw-r--r--CMakeLists.txt9
-rw-r--r--src/vendor/cgltf-include.cpp5
-rw-r--r--src/vendor/cgltf-include.hpp6
3 files changed, 20 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ed4b76..ce3be95 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,16 +18,21 @@ set(PKE_SOURCE_FILES
src/components.cpp
src/ecs.hpp
src/ecs.cpp
+ src/entities.hpp
+ src/entities.cpp
src/event.hpp
src/event.cpp
src/game.hpp
src/game.cpp
src/memory.hpp
src/memory.cpp
+ src/memory-allocator.hpp
src/dynamic-array.hpp
src/dynamic-array.cpp
src/asset-manager.hpp
src/asset-manager.cpp
+ src/vendor/cgltf-include.hpp
+ src/vendor/cgltf-include.cpp
src/vendor/glm_include.hpp
src/vendor/stb_image_include.hpp
src/vendor/stb_image_include.cpp
@@ -121,6 +126,10 @@ FetchContent_Declare(stb URL https://github.com/nothings/stb/archive/5736b15f7ea
FetchContent_MakeAvailable(stb)
target_include_directories(pke PUBLIC "${PROJECT_BINARY_DIR}/_deps/stb-src")
+FetchContent_Declare(cgltf URL https://github.com/jkuhlmann/cgltf/archive/271614ce5fa8bed6daf3bc824d12a3a652ebdb15.zip)
+FetchContent_MakeAvailable(cgltf)
+target_include_directories(pke PUBLIC "${PROJECT_BINARY_DIR}/_deps/cgltf-src")
+
target_include_directories(pke PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(pke PUBLIC imguidocked)
diff --git a/src/vendor/cgltf-include.cpp b/src/vendor/cgltf-include.cpp
new file mode 100644
index 0000000..9df78c9
--- /dev/null
+++ b/src/vendor/cgltf-include.cpp
@@ -0,0 +1,5 @@
+
+#define CGLTF_IMPLEMENTATION
+
+#include "cgltf-include.hpp"
+
diff --git a/src/vendor/cgltf-include.hpp b/src/vendor/cgltf-include.hpp
new file mode 100644
index 0000000..7f69ca0
--- /dev/null
+++ b/src/vendor/cgltf-include.hpp
@@ -0,0 +1,6 @@
+#ifndef PKE_VENDOR_CGLTF_HPP
+#define PKE_VENDOR_CGLTF_HPP
+
+#include "cgltf.h"
+
+#endif /* PKE_VENDOR_CGLTF_HPP */