Skip to content

Commit 99ae6af

Browse files
committed
chore!: rename options to have generic commonlib prefix
1 parent 8ce1829 commit 99ae6af

7 files changed

Lines changed: 27 additions & 27 deletions

File tree

include/REL/Trampoline.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "REX/BASE.h"
44
#include "REX/REX/CAST.h"
55

6-
#ifdef XSE_SUPPORT_XBYAK
6+
#ifdef COMMONLIB_OPTION_XBYAK
77
namespace Xbyak
88
{
99
class CodeGenerator;
@@ -55,7 +55,7 @@ namespace REL
5555

5656
[[nodiscard]] void* allocate(const std::size_t a_size);
5757

58-
#ifdef XSE_SUPPORT_XBYAK
58+
#ifdef COMMONLIB_OPTION_XBYAK
5959
[[nodiscard]] void* allocate(const Xbyak::CodeGenerator& a_code);
6060
#endif
6161

include/REX/REX/INI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "REX/REX/Setting.h"
44

5-
#ifdef REX_OPTION_INI
5+
#ifdef COMMONLIB_OPTION_INI
66
namespace REX::INI
77
{
88
using sec_t = std::string_view;

include/REX/REX/JSON.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "REX/REX/Setting.h"
44

5-
#ifdef REX_OPTION_JSON
5+
#ifdef COMMONLIB_OPTION_JSON
66
namespace REX::JSON
77
{
88
using path_t = std::string_view;

include/REX/REX/TOML.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "REX/REX/Setting.h"
44

5-
#ifdef REX_OPTION_TOML
5+
#ifdef COMMONLIB_OPTION_TOML
66
namespace REX::TOML
77
{
88
using sec_t = std::vector<std::string>;

src/REL/Trampoline.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "REX/W32/KERNEL32.h"
99

1010
// xbyak brings in <Windows.h>
11-
#ifdef XSE_SUPPORT_XBYAK
11+
#ifdef COMMONLIB_OPTION_XBYAK
1212
# include <xbyak/xbyak.h>
1313
# undef ERROR
1414
# undef max
@@ -146,7 +146,7 @@ namespace REL
146146
return mem;
147147
}
148148

149-
#ifdef XSE_SUPPORT_XBYAK
149+
#ifdef COMMONLIB_OPTION_XBYAK
150150
void* Trampoline::allocate(const Xbyak::CodeGenerator& a_code)
151151
{
152152
auto mem = allocate(a_code.getSize());

src/REX/REX.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <spdlog/spdlog.h>
1010

11-
#ifdef REX_OPTION_INI
11+
#ifdef COMMONLIB_OPTION_INI
1212
# include <SimpleIni.h>
1313
# undef ERROR
1414

@@ -118,7 +118,7 @@ namespace REX::INI
118118
}
119119
#endif
120120

121-
#ifdef REX_OPTION_JSON
121+
#ifdef COMMONLIB_OPTION_JSON
122122
# include <nlohmann/json.hpp>
123123

124124
namespace REX::JSON
@@ -222,7 +222,7 @@ namespace REX::JSON
222222
}
223223
#endif
224224

225-
#ifdef REX_OPTION_TOML
225+
#ifdef COMMONLIB_OPTION_TOML
226226
# include <toml.hpp>
227227

228228
namespace REX::TOML

xmake.lua

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,38 @@ set_encodings("utf-8")
1111
add_rules("mode.debug", "mode.releasedbg")
1212

1313
-- add options
14-
option("rex_ini", function()
14+
option("commonlib_ini", function()
1515
set_default(false)
1616
set_description("enable REX::INI settings support")
17-
add_defines("REX_OPTION_INI=1")
17+
add_defines("COMMONLIB_OPTION_INI=1")
1818
end)
1919

20-
option("rex_json", function()
20+
option("commonlib_json", function()
2121
set_default(false)
2222
set_description("enable REX::JSON settings support")
23-
add_defines("REX_OPTION_JSON=1")
23+
add_defines("COMMONLIB_OPTION_JSON=1")
2424
end)
2525

26-
option("rex_toml", function()
26+
option("commonlib_toml", function()
2727
set_default(false)
2828
set_description("enable REX::TOML settings support")
29-
add_defines("REX_OPTION_TOML=1")
29+
add_defines("COMMONLIB_OPTION_TOML=1")
3030
end)
3131

32-
option("xse_xbyak", function()
32+
option("commonlib_xbyak", function()
3333
set_default(false)
3434
set_description("enable xbyak support for Trampoline")
35-
add_defines("XSE_SUPPORT_XBYAK=1")
35+
add_defines("COMMONLIB_OPTION_XBYAK=1")
3636
end)
3737

3838
-- add packages
3939
add_requires("spdlog", { configs = { header_only = false, wchar = true, std_format = true } })
4040

4141
-- add config packages
42-
if has_config("rex_ini") then add_requires("simpleini") end
43-
if has_config("rex_json") then add_requires("nlohmann_json") end
44-
if has_config("rex_toml") then add_requires("toml11") end
45-
if has_config("xse_xbyak") then add_requires("xbyak") end
42+
if has_config("commonlib_ini") then add_requires("simpleini") end
43+
if has_config("commonlib_json") then add_requires("nlohmann_json") end
44+
if has_config("commonlib_toml") then add_requires("toml11") end
45+
if has_config("commonlib_xbyak") then add_requires("xbyak") end
4646

4747
target("commonlib-shared", function()
4848
-- set target kind
@@ -52,13 +52,13 @@ target("commonlib-shared", function()
5252
add_packages("spdlog", { public = true })
5353

5454
-- add config packages
55-
if has_config("rex_ini") then add_packages("simpleini", { public = true }) end
56-
if has_config("rex_json") then add_packages("nlohmann_json", { public = true }) end
57-
if has_config("rex_toml") then add_packages("toml11", { public = true }) end
58-
if has_config("xse_xbyak") then add_packages("xbyak", { public = true }) end
55+
if has_config("commonlib_ini") then add_packages("simpleini", { public = true }) end
56+
if has_config("commonlib_json") then add_packages("nlohmann_json", { public = true }) end
57+
if has_config("commonlib_toml") then add_packages("toml11", { public = true }) end
58+
if has_config("commonlib_xbyak") then add_packages("xbyak", { public = true }) end
5959

6060
-- add options
61-
add_options("rex_ini", "rex_json", "rex_toml", "xse_xbyak", { public = true })
61+
add_options("commonlib_ini", "commonlib_json", "commonlib_toml", "commonlib_xbyak", { public = true })
6262

6363
-- add system links
6464
add_syslinks("advapi32", "bcrypt", "d3d11", "d3dcompiler", "dbghelp", "dxgi", "ole32", "shell32", "user32", "version", "ws2_32")

0 commit comments

Comments
 (0)