Ver Fonte

Add dynamic goal to library

Patrick-Christopher Mattulat há 1 ano atrás
pai
commit
286655e1d9

+ 20 - 0
include/ls-math/os/dynamic_goal.hpp

@@ -0,0 +1,20 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2022-11-06
+ * Changed:         2022-11-06
+ *
+ * */
+
+#ifndef LS_MATH_DYNAMIC_GOAL_HPP
+#define LS_MATH_DYNAMIC_GOAL_HPP
+
+#if defined(_WIN32) && defined(_MSC_VER)
+#include <ls-math/os/windows/msvc_dll_definitions.hpp>
+#endif
+#if defined(unix) || defined(__APPLE__) || defined(_WIN32) && defined(__GNUC__)
+#include <ls-math/os/unix/unix_so_definitions.hpp>
+#endif
+
+#endif

+ 15 - 0
include/ls-math/os/unix/unix_so_definitions.hpp

@@ -0,0 +1,15 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2022-11-06
+ * Changed:         2022-11-06
+ *
+ * */
+
+#ifndef LS_MATH_UNIX_SO_DEFINITIONS_HPP
+#define LS_MATH_UNIX_SO_DEFINITIONS_HPP
+
+#define LS_MATH_DYNAMIC_GOAL
+
+#endif

+ 17 - 0
include/ls-math/os/windows/msvc_dll_definitions.hpp

@@ -0,0 +1,17 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2022-11-06
+ * Changed:         2022-11-06
+ *
+ * */
+
+#ifndef LS_MATH_MSVC_DLL_DEFINITIONS_HPP
+#define LS_MATH_MSVC_DLL_DEFINITIONS_HPP
+
+#define LS_MATH_DLL_EXPORT        __declspec(dllexport)
+#define LS_MATH_DLL_IMPORT        __declspec(dllimport)
+#define LS_MATH_DYNAMIC_GOAL      LS_MATH_DLL_EXPORT
+
+#endif

+ 2 - 1
include/ls-math/vector/Vector2.hpp

@@ -11,11 +11,12 @@
 #define LS_MATH_VECTOR2_HPP
 
 #include <ls-math/core/types/VectorTypes.hpp>
+#include <ls-math/os/dynamic_goal.hpp>
 #include <cstdlib>
 
 namespace ls::math::vector
 {
-  class Vector2
+  class LS_MATH_DYNAMIC_GOAL Vector2
   {
     public: