From 8b55786e772ba095bb735398c73707a7db760331 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Sat, 27 Jul 2024 11:14:44 +0200 Subject: [PATCH] Added LIBRARY_EXT constant. --- source/mijin/util/os.cpp | 1 - source/mijin/util/os.hpp | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/mijin/util/os.cpp b/source/mijin/util/os.cpp index 621914f..f3537b9 100644 --- a/source/mijin/util/os.cpp +++ b/source/mijin/util/os.cpp @@ -2,7 +2,6 @@ #include "os.hpp" #include -#include "../detect.hpp" #if MIJIN_TARGET_OS == MIJIN_OS_LINUX #include diff --git a/source/mijin/util/os.hpp b/source/mijin/util/os.hpp index ec936c7..616ffc5 100644 --- a/source/mijin/util/os.hpp +++ b/source/mijin/util/os.hpp @@ -20,6 +20,15 @@ namespace mijin // public constants // +#if MIJIN_TARGET_OS == MIJIN_OS_LINUX +inline const std::string_view LIBRARY_EXT = "so"; +#elif MIJIN_TARGET_OS == MIJIN_OS_WINDOWS +inline const std::string_view LIBRARY_EXT = "dll"; +#else +[[deprecated("OS not supported.")]] +inline const int LIBRARY_EXT = 0; +#endif + // // public types //