mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-10-13 22:47:18 +02:00
Add UTF8 library.
This commit is contained in:
@@ -85,6 +85,7 @@ add_library(SqModule MODULE SqBase.hpp Main.cpp
|
||||
Library/System/Dir.cpp Library/System/Dir.hpp
|
||||
Library/System/Env.cpp Library/System/Env.hpp
|
||||
Library/System/Path.cpp Library/System/Path.hpp
|
||||
Library/UTF8.cpp Library/UTF8.hpp
|
||||
Library/Utils.cpp Library/Utils.hpp
|
||||
Library/Utils/Announce.cpp Library/Utils/Announce.hpp
|
||||
Library/Utils/String.cpp Library/Utils/String.hpp
|
||||
@@ -131,7 +132,7 @@ if(WIN32 OR MINGW)
|
||||
target_link_libraries(SqModule wsock32 ws2_32 shlwapi)
|
||||
endif()
|
||||
# Link to base libraries
|
||||
target_link_libraries(SqModule Squirrel fmt::fmt SimpleINI TinyDir xxHash ConcurrentQueue SAJSON CPR PUGIXML CivetWeb maxminddb libzmq-static)
|
||||
target_link_libraries(SqModule Squirrel fmt::fmt SimpleINI TinyDir xxHash ConcurrentQueue SAJSON CPR UTF8Lib PUGIXML CivetWeb maxminddb libzmq-static)
|
||||
# Enable built-in Discord support
|
||||
if(ENABLE_DISCORD)
|
||||
target_link_libraries(SqModule DPP)
|
||||
|
19
module/Library/UTF8.cpp
Normal file
19
module/Library/UTF8.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Library/UTF8.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
// ================================================================================================
|
||||
void Register_UTF8(HSQUIRRELVM vm)
|
||||
{
|
||||
Table ns(vm);
|
||||
|
||||
RootTable(vm).Bind(_SC("SqUTF8"), ns);
|
||||
}
|
||||
|
||||
} // Namespace:: SqMod
|
14
module/Library/UTF8.hpp
Normal file
14
module/Library/UTF8.hpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Core/Utility.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <utf8.h>
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
|
||||
|
||||
} // Namespace:: SqMod
|
@@ -41,6 +41,7 @@ extern void Register_Net(HSQUIRRELVM vm);
|
||||
extern void Register_Numeric(HSQUIRRELVM vm);
|
||||
extern void Register_String(HSQUIRRELVM vm);
|
||||
extern void Register_System(HSQUIRRELVM vm);
|
||||
extern void Register_UTF8(HSQUIRRELVM vm);
|
||||
extern void Register_Utils(HSQUIRRELVM vm);
|
||||
extern void Register_XML(HSQUIRRELVM vm);
|
||||
extern void Register_ZMQ(HSQUIRRELVM vm);
|
||||
@@ -110,6 +111,7 @@ bool RegisterAPI(HSQUIRRELVM vm)
|
||||
Register_Numeric(vm);
|
||||
Register_String(vm);
|
||||
Register_System(vm);
|
||||
Register_UTF8(vm);
|
||||
Register_Utils(vm);
|
||||
Register_XML(vm);
|
||||
Register_ZMQ(vm);
|
||||
|
Reference in New Issue
Block a user