From fee5486ea22f6f0132296af3040d09c2f583204d Mon Sep 17 00:00:00 2001 From: Quinn Date: Mon, 3 Feb 2025 12:20:30 -0500 Subject: [PATCH] Refactored folder layout --- library.json | 20 +++++++++++++++++ src/CMakeLists.txt | 38 ++++++++++++++++++++++++++++++++ Matrix.cpp => src/Matrix.cpp | 0 Matrix.hpp => src/Matrix.hpp | 0 Vector3D.cpp => src/Vector3D.cpp | 0 Vector3D.hpp => src/Vector3D.hpp | 0 6 files changed, 58 insertions(+) create mode 100644 library.json create mode 100644 src/CMakeLists.txt rename Matrix.cpp => src/Matrix.cpp (100%) rename Matrix.hpp => src/Matrix.hpp (100%) rename Vector3D.cpp => src/Vector3D.cpp (100%) rename Vector3D.hpp => src/Vector3D.hpp (100%) diff --git a/library.json b/library.json new file mode 100644 index 0000000..3087d6c --- /dev/null +++ b/library.json @@ -0,0 +1,20 @@ +{ + "name": "Vector3D", + "version": "1.0.0", + "description": "Contains a V3D object for easy 3d vector math and a Matrix object for more complicated linear algebra operations.", + "keywords": "linear algebra, vector, matrix, 3D", + "repository": { + "type": "git", + "url": "https://github.com/Cynopolis/Vector3D.git" + }, + "authors": [ + { + "name": "Cynopolis", + "email": "megaveganzombie@gmail.com", + "url": "https://github.com/Cynopolis" + } + ], + "license": "None Yet", + "frameworks": "*", + "platforms": "*" +} \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..33460ef --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,38 @@ +# Vector 3D Interface +add_library(vector-3d-intf + INTERFACE +) + +target_include_directories(vector-3d-intf + INTERFACE + . +) + +# Matrix +add_library(matrix + STATIC + Matrix.cpp +) + +target_link_libraries(matrix + PUBLIC + vector-3d-intf + PRIVATE +) + +set_target_properties(matrix + PROPERTIES + LINKER_LANGUAGE CXX +) + +# Vector3d +add_library(vector-3d + STATIC + Vector3D.cpp +) + +target_link_libraries(vector-3d + PUBLIC + vector-3d-intf + PRIVATE +) \ No newline at end of file diff --git a/Matrix.cpp b/src/Matrix.cpp similarity index 100% rename from Matrix.cpp rename to src/Matrix.cpp diff --git a/Matrix.hpp b/src/Matrix.hpp similarity index 100% rename from Matrix.hpp rename to src/Matrix.hpp diff --git a/Vector3D.cpp b/src/Vector3D.cpp similarity index 100% rename from Vector3D.cpp rename to src/Vector3D.cpp diff --git a/Vector3D.hpp b/src/Vector3D.hpp similarity index 100% rename from Vector3D.hpp rename to src/Vector3D.hpp