From 770027473eab689a7f380c95b3484f26d003d5b1 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Sat, 3 Jul 2021 11:57:38 -0700 Subject: [PATCH] :sparkles: more flags in CMake --- CMakeLists.txt | 8 ++++++++ ccash_config.hpp.in | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cac69b..71135af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,14 @@ else() set(MULTI_THREADED_VAL true) endif() +if(RETURN_ON_DEL_NAME) +set(RETURN_ON_DEL_VAL true) +set(RETURN_ON_DEL_NAME_VAL ${RETURN_ON_DEL_NAME}) +else() +set(RETURN_ON_DEL_VAL false) +set(RETURN_ON_DEL_NAME_VAL "\"\"") +endif() + configure_file(ccash_config.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/include/ccash_config.hpp) target_include_directories(${PROJECT_NAME} PUBLIC include) diff --git a/ccash_config.hpp.in b/ccash_config.hpp.in index 3e3e36c..bc0c94b 100644 --- a/ccash_config.hpp.in +++ b/ccash_config.hpp.in @@ -12,8 +12,8 @@ constexpr const char *users_location = @USER_SAVE@; constexpr const char *config_location = @DROGON_CONFIG@; // Returns money to an account on deletion (useful if you dont want any money to leave the economy) -#define RETURN_ON_DEL false -constexpr const char *return_account = ""; +#define RETURN_ON_DEL @RETURN_ON_DEL_VAL@ +constexpr const char *return_account = @RETURN_ON_DEL_NAME_VAL@; /* if true, when frequency is hit AND changes have happened then save