diff --git a/CMakeLists.txt b/CMakeLists.txt index f04d117c9..0012d7654 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -276,6 +276,10 @@ if(VLC_PLAYER) add_definitions(-DBUILD_VLC_PLAYER) endif() +if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14) + add_definitions(-DLEGACY_MACOS) +endif() + # GLM library options. add_definitions(-DGLM_FORCE_CXX17) add_definitions(-DGLM_FORCE_XYZW_ONLY) diff --git a/es-core/src/ThemeData.h b/es-core/src/ThemeData.h index ecd479089..416c0d433 100644 --- a/es-core/src/ThemeData.h +++ b/es-core/src/ThemeData.h @@ -127,6 +127,21 @@ public: template const T get(const std::string& prop) const { +#if defined(LEGACY_MACOS) + if (std::is_same::value) + return *(const T*)&properties.at(prop).v; + else if (std::is_same::value) + return *(const T*)&properties.at(prop).s; + else if (std::is_same::value) + return *(const T*)&properties.at(prop).i; + else if (std::is_same::value) + return *(const T*)&properties.at(prop).f; + else if (std::is_same::value) + return *(const T*)&properties.at(prop).b; + else if (std::is_same::value) + return *(const T*)&properties.at(prop).r; + return T(); +#else if (std::is_same::value) return std::any_cast(properties.at(prop).v); else if (std::is_same::value) @@ -140,6 +155,7 @@ public: else if (std::is_same::value) return std::any_cast(properties.at(prop).r); return T(); +#endif } bool has(const std::string& prop) const