From f47bd600032afd51d550737b3d7b78ba7356d614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gaier?= Date: Tue, 20 Feb 2024 21:55:56 -0500 Subject: [PATCH] Improve ConfigLibs more --- config/MyConfig/jabyengine_custom_config.hpp | 4 +--- config/dummy_default_config.hpp | 7 +++++++ mkfile/common/CustomConfigHelper.mk | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 config/dummy_default_config.hpp diff --git a/config/MyConfig/jabyengine_custom_config.hpp b/config/MyConfig/jabyengine_custom_config.hpp index 230e7049..f090936a 100644 --- a/config/MyConfig/jabyengine_custom_config.hpp +++ b/config/MyConfig/jabyengine_custom_config.hpp @@ -1,7 +1,5 @@ -//#pragma once -//TODO: Why is pragma once not working?! +#include "../dummy_default_config.hpp" -//TODO: Fix IntelliSense struct CustomConfiguration : public DefaultConfiguration { struct Test { static constexpr const char* string() { diff --git a/config/dummy_default_config.hpp b/config/dummy_default_config.hpp new file mode 100644 index 00000000..5f23015f --- /dev/null +++ b/config/dummy_default_config.hpp @@ -0,0 +1,7 @@ +#pragma once +#ifdef __INTELLISENSE__ +// This provides a dummy struct so IntelliSense is happy + +struct DefaultConfiguration { +}; +#endif //! __INTELLISENSE__ \ No newline at end of file diff --git a/mkfile/common/CustomConfigHelper.mk b/mkfile/common/CustomConfigHelper.mk index a4874437..35bdb867 100644 --- a/mkfile/common/CustomConfigHelper.mk +++ b/mkfile/common/CustomConfigHelper.mk @@ -1,5 +1,4 @@ JABY_ENGINE_CONFIG_DIR = $(JABY_ENGINE_DIR)config ifdef CUSTOM_CONFIG - # TODO: Use same header for -I and -imacros? CCFLAGS += -I$(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG) -imacros $(JABY_ENGINE_CONFIG_DIR)/$(CUSTOM_CONFIG)/jabyengine_custom_config.hpp endif \ No newline at end of file