mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Fix libsodium support (oops). Fix perl support (more oops)
This commit is contained in:
parent
a7d98c2391
commit
aff9fd6de8
@ -74,6 +74,7 @@ find_package(OpenSSL REQUIRED)
|
|||||||
find_package(recastnavigation CONFIG REQUIRED)
|
find_package(recastnavigation CONFIG REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(LuaJit REQUIRED)
|
find_package(LuaJit REQUIRED)
|
||||||
|
find_package(unofficial-sodium CONFIG REQUIRED)
|
||||||
find_package(PerlLibs)
|
find_package(PerlLibs)
|
||||||
|
|
||||||
message(STATUS "**************************************************")
|
message(STATUS "**************************************************")
|
||||||
|
|||||||
@ -763,9 +763,9 @@ include_directories(Patches SocketLib StackWalker)
|
|||||||
|
|
||||||
add_library(common ${common_sources} ${common_headers} ${repositories})
|
add_library(common ${common_sources} ${common_headers} ${repositories})
|
||||||
|
|
||||||
target_compile_definitions(common PUBLIC BOOST_BIND_GLOBAL_PLACEHOLDERS GLM_FORCE_RADIANS GLM_FORCE_CTOR_INIT GLM_ENABLE_EXPERIMENTAL)
|
target_compile_definitions(common PUBLIC BOOST_BIND_GLOBAL_PLACEHOLDERS GLM_FORCE_RADIANS GLM_FORCE_CTOR_INIT GLM_ENABLE_EXPERIMENTAL ENABLE_SECURITY)
|
||||||
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../submodules/websocketpp")
|
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../submodules/websocketpp")
|
||||||
target_link_libraries(common PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv> OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB)
|
target_link_libraries(common PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv> OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB unofficial-sodium::sodium)
|
||||||
|
|
||||||
# Requires libgoogle-perftools-dev google-perftools packages for linux (debian)
|
# Requires libgoogle-perftools-dev google-perftools packages for linux (debian)
|
||||||
if(EQEMU_ADD_PROFILER)
|
if(EQEMU_ADD_PROFILER)
|
||||||
|
|||||||
@ -41,8 +41,6 @@ target_include_directories(perlbind PUBLIC
|
|||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include>)
|
$<INSTALL_INTERFACE:include>)
|
||||||
|
|
||||||
target_compile_definitions(perlbind PUBLIC EMBPERL EMBPERL_PLUGIN PERLBIND_NO_STRICT_SCALAR_TYPES)
|
|
||||||
|
|
||||||
option(PERLBIND_BUILD_TESTS "Build tests" OFF)
|
option(PERLBIND_BUILD_TESTS "Build tests" OFF)
|
||||||
option(PERLBIND_ENABLE_ASAN "Build with address sanitizer" OFF)
|
option(PERLBIND_ENABLE_ASAN "Build with address sanitizer" OFF)
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
"fmt",
|
"fmt",
|
||||||
"glm",
|
"glm",
|
||||||
"libuv",
|
"libuv",
|
||||||
"recastnavigation"
|
"recastnavigation",
|
||||||
|
"libsodium"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -660,7 +660,7 @@ source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${zo
|
|||||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${gm_command_sources})
|
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${gm_command_sources})
|
||||||
|
|
||||||
add_library(gm_commands_zone STATIC ${gm_command_sources})
|
add_library(gm_commands_zone STATIC ${gm_command_sources})
|
||||||
target_link_libraries(gm_commands_zone PRIVATE cereal::cereal fmt::fmt $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv> unofficial::libmariadb)
|
target_link_libraries(gm_commands_zone PRIVATE common)
|
||||||
set_target_properties(gm_commands_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 32)
|
set_target_properties(gm_commands_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 32)
|
||||||
|
|
||||||
add_executable(zone ${zone_sources} ${zone_headers})
|
add_executable(zone ${zone_sources} ${zone_headers})
|
||||||
@ -677,14 +677,15 @@ add_definitions(-DZONE)
|
|||||||
|
|
||||||
if(EQEMU_BUILD_LUA)
|
if(EQEMU_BUILD_LUA)
|
||||||
target_compile_definitions(lua_zone PUBLIC LUA_EQEMU)
|
target_compile_definitions(lua_zone PUBLIC LUA_EQEMU)
|
||||||
target_link_libraries(lua_zone PRIVATE luabind Boost::dynamic_bitset Boost::tuple Boost::foreach common)
|
target_link_libraries(lua_zone PUBLIC luabind Boost::dynamic_bitset Boost::tuple Boost::foreach common)
|
||||||
if (EQEMU_BUILD_STATIC AND LUA_LIBRARY)
|
if (EQEMU_BUILD_STATIC AND LUA_LIBRARY)
|
||||||
target_link_libraries(zone PRIVATE ${LUA_LIBRARY})
|
target_link_libraries(zone PRIVATE ${LUA_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EQEMU_BUILD_PERL)
|
if(EQEMU_BUILD_PERL)
|
||||||
target_link_libraries(perl_zone PRIVATE perlbind common ${PERL_LIBRARY_LIBS})
|
target_compile_definitions(perl_zone PUBLIC EMBPERL EMBPERL_PLUGIN PERLBIND_NO_STRICT_SCALAR_TYPES)
|
||||||
|
target_link_libraries(perl_zone PUBLIC perlbind common ${PERL_LIBRARY})
|
||||||
if (EQEMU_BUILD_STATIC AND PERL_LIBRARY)
|
if (EQEMU_BUILD_STATIC AND PERL_LIBRARY)
|
||||||
target_link_libraries(zone PRIVATE ${PERL_LIBRARY})
|
target_link_libraries(zone PRIVATE ${PERL_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -2485,27 +2485,27 @@ std::string Perl__get_rule(const char* rule_name)
|
|||||||
|
|
||||||
std::string Perl__get_data(std::string bucket_key)
|
std::string Perl__get_data(std::string bucket_key)
|
||||||
{
|
{
|
||||||
return DataBucket::GetData(bucket_key);
|
return DataBucket::GetData(&database, bucket_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Perl__get_data_expires(std::string bucket_key)
|
std::string Perl__get_data_expires(std::string bucket_key)
|
||||||
{
|
{
|
||||||
return DataBucket::GetDataExpires(bucket_key);
|
return DataBucket::GetDataExpires(&database, bucket_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Perl__set_data(std::string key, std::string value)
|
void Perl__set_data(std::string key, std::string value)
|
||||||
{
|
{
|
||||||
DataBucket::SetData(key, value);
|
DataBucket::SetData(&database, key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Perl__set_data(std::string key, std::string value, std::string expires_at)
|
void Perl__set_data(std::string key, std::string value, std::string expires_at)
|
||||||
{
|
{
|
||||||
DataBucket::SetData(key, value, expires_at);
|
DataBucket::SetData(&database, key, value, expires_at);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Perl__delete_data(std::string bucket_key)
|
bool Perl__delete_data(std::string bucket_key)
|
||||||
{
|
{
|
||||||
return DataBucket::DeleteData(bucket_key);
|
return DataBucket::DeleteData(&database, bucket_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Perl__IsClassicEnabled()
|
bool Perl__IsClassicEnabled()
|
||||||
@ -3045,7 +3045,7 @@ void Perl__rename(std::string name)
|
|||||||
|
|
||||||
std::string Perl__get_data_remaining(std::string bucket_name)
|
std::string Perl__get_data_remaining(std::string bucket_name)
|
||||||
{
|
{
|
||||||
return DataBucket::GetDataRemaining(bucket_name);
|
return DataBucket::GetDataRemaining(&database, bucket_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int Perl__getitemstat(uint32 item_id, std::string identifier)
|
const int Perl__getitemstat(uint32 item_id, std::string identifier)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user