mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-15 22:44:42 -04:00
fix build for cross compilation clang
This commit is contained in:
parent
b78ce23d1e
commit
54e082e8d5
3 changed files with 21 additions and 15 deletions
|
@ -54,6 +54,12 @@ include(cmake/GeodeFile.cmake)
|
|||
include(cmake/Platform.cmake)
|
||||
include(cmake/CPM.cmake)
|
||||
|
||||
# this is needed for cross compilation on linux,
|
||||
# since fmtlib will fail to compile otherwise
|
||||
if (GEODE_DISABLE_FMT_CONSTEVAL)
|
||||
target_compile_definitions(${PROJECT_NAME} INTERFACE -DFMT_CONSTEVAL=)
|
||||
endif()
|
||||
|
||||
CPMAddPackage("gh:geode-sdk/json#2b76460")
|
||||
CPMAddPackage("gh:fmtlib/fmt#9.1.0")
|
||||
CPMAddPackage("gh:gulrak/filesystem#3e5b930")
|
||||
|
|
|
@ -219,9 +219,9 @@ namespace geode {
|
|||
using ColorAlphaSettingValue = GeodeSettingValue<ColorAlphaSetting>;
|
||||
|
||||
template<class T>
|
||||
struct SettingValueSetter {
|
||||
static GEODE_DLL T get(SettingValue* setting);
|
||||
static GEODE_DLL void set(SettingValue* setting, T const& value);
|
||||
struct GEODE_DLL SettingValueSetter {
|
||||
static T get(SettingValue* setting);
|
||||
static void set(SettingValue* setting, T const& value);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -275,18 +275,6 @@ std::string SettingValue::getKey() const {
|
|||
typename type_##Setting::ValueType const& value \
|
||||
) const
|
||||
|
||||
// instantiate value setters
|
||||
|
||||
namespace geode {
|
||||
template struct SettingValueSetter<typename BoolSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename IntSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename FloatSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename StringSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename FileSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename ColorSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename ColorAlphaSetting::ValueType>;
|
||||
}
|
||||
|
||||
// instantiate values
|
||||
|
||||
namespace geode {
|
||||
|
@ -370,6 +358,18 @@ IMPL_NODE_AND_SETTERS(File);
|
|||
IMPL_NODE_AND_SETTERS(Color);
|
||||
IMPL_NODE_AND_SETTERS(ColorAlpha);
|
||||
|
||||
// instantiate value setters
|
||||
|
||||
namespace geode {
|
||||
template struct SettingValueSetter<typename BoolSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename IntSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename FloatSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename StringSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename FileSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename ColorSetting::ValueType>;
|
||||
template struct SettingValueSetter<typename ColorAlphaSetting::ValueType>;
|
||||
}
|
||||
|
||||
// SettingChangedEvent
|
||||
|
||||
SettingChangedEvent::SettingChangedEvent(Mod* mod, SettingValue* value)
|
||||
|
|
Loading…
Add table
Reference in a new issue