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