Improved build helper scripts for the server
This commit is contained in:
parent
a651eb879e
commit
45a32496ba
@ -5,12 +5,16 @@ set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules")
|
||||
set(TEASPEAK_SERVER ON)
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
|
||||
#end now
|
||||
#set(MEMORY_DEBUG_FLAGS " -fsanitize=leak -fsanitize=address -fstack-protector-all ")
|
||||
#set(MEMORY_DEBUG_FLAGS "-fsanitize=address")
|
||||
|
||||
set(LIBRARY_PATH "${CMAKE_SOURCE_DIR}/../libraries/")
|
||||
if (BUILD_INCLUDE_FILE)
|
||||
include(${BUILD_INCLUDE_FILE})
|
||||
endif ()
|
||||
|
||||
set(CMAKE_PREFIX_PATH "/home/wolverindev/clib/qt/5.6.1/5.6/gcc_64/lib/cmake")
|
||||
set(LIBEVENT_PATH "${LIBRARY_PATH}/event/build/lib/")
|
||||
|
||||
@ -41,20 +45,40 @@ if (NOT BUILD_OS_ARCH)
|
||||
set(BUILD_OS_ARCH $ENV{build_os_arch})
|
||||
endif ()
|
||||
|
||||
resolve_library(LIBRARY_TOM_MATH OFF "${LIBRARY_PATH}/tommath/build/libtommathStatic.a")
|
||||
resolve_library(LIBRARY_TOM_CRYPT OFF "${LIBRARY_PATH}/tomcrypt/libtomcrypt.a")
|
||||
resolve_library(LIBRARY_PATH_BREAKPAD OFF "${LIBRARY_PATH}/breakpad/build/src/client/linux/libbreakpad_client.a")
|
||||
resolve_library(LIBRARY_PATH_PROTOBUF OFF "${LIBRARY_PATH}/protobuf/build/libprotobuf.a")
|
||||
resolve_library(LIBRARY_PATH_BORINGSSL_SSL OFF "${LIBRARY_PATH}/boringssl/build/ssl/libssl.so")
|
||||
resolve_library(LIBRARY_PATH_BORINGSSL_CRYPTO OFF "${LIBRARY_PATH}/boringssl/build/crypto/libcrypto.so")
|
||||
resolve_library(LIBRARY_PATH_THREAD_POOL OFF "${LIBRARY_PATH}/Thread-Pool/build/libThreadPoolStatic.a")
|
||||
resolve_library(LIBRARY_PATH_TERMINAL OFF "${LIBRARY_PATH}/CXXTerminal/build/libCXXTerminalStatic.a")
|
||||
resolve_library(LIBRARY_PATH_VARIBALES OFF "${LIBRARY_PATH}/StringVariable/build/libStringVariablesStatic.a")
|
||||
resolve_library(LIBRARY_PATH_YAML OFF "${LIBRARY_PATH}/yaml-cpp/build/libyaml-cpp.a")
|
||||
resolve_library(LIBRARY_PATH_JSON OFF "${LIBRARY_PATH}/jsoncpp/build/src/lib_json/libjsoncpp.a")
|
||||
resolve_library(LIBRARY_PATH_ED255 OFF "${LIBRARY_PATH}/ed25519/build/libed25519.a")
|
||||
resolve_library(LIBRARY_PATH_DATA_PIPES OFF "${LIBRARY_PATH}/DataPipes/build/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-release/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-debug/libDataPipes.so")
|
||||
resolve_library(LIBRARY_PATH_OPUS OFF "${LIBRARY_PATH}/opus/build/.libs/libopus.a")
|
||||
find_package(TomMath REQUIRED)
|
||||
find_package(TomCrypt REQUIRED)
|
||||
find_package(Breakpad REQUIRED)
|
||||
find_package(Protobuf REQUIRED)
|
||||
find_package(Boringssl REQUIRED)
|
||||
find_package(ThreadPool REQUIRED)
|
||||
find_package(CXXTerminal REQUIRED)
|
||||
find_package(StringVariable REQUIRED)
|
||||
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
|
||||
find_package(Libevent REQUIRED)
|
||||
find_package(jsoncpp REQUIRED)
|
||||
find_package(Ed25519 REQUIRED)
|
||||
find_package(DataPipes REQUIRED)
|
||||
find_package(Opus REQUIRED)
|
||||
find_package(spdlog REQUIRED)
|
||||
find_package(Jemalloc REQUIRED)
|
||||
find_package(Protobuf REQUIRED)
|
||||
|
||||
#resolve_library(LIBRARY_TOM_MATH OFF "${LIBRARY_PATH}/tommath/build/libtommathStatic.a")
|
||||
#resolve_library(LIBRARY_TOM_CRYPT OFF "${LIBRARY_PATH}/tomcrypt/libtomcrypt.a")
|
||||
#resolve_library(LIBRARY_PATH_BREAKPAD OFF "${LIBRARY_PATH}/breakpad/build/src/client/linux/libbreakpad_client.a")
|
||||
#resolve_library(LIBRARY_PATH_PROTOBUF OFF "${LIBRARY_PATH}/protobuf/build/libprotobuf.a")
|
||||
#resolve_library(LIBRARY_PATH_BORINGSSL_SSL OFF "${LIBRARY_PATH}/boringssl/build/ssl/libssl.so")
|
||||
#resolve_library(LIBRARY_PATH_BORINGSSL_CRYPTO OFF "${LIBRARY_PATH}/boringssl/build/crypto/libcrypto.so")
|
||||
#resolve_library(LIBRARY_PATH_THREAD_POOL OFF "${LIBRARY_PATH}/Thread-Pool/build/libThreadPoolStatic.a")
|
||||
#resolve_library(LIBRARY_PATH_TERMINAL OFF "${LIBRARY_PATH}/CXXTerminal/build/libCXXTerminalStatic.a")
|
||||
#resolve_library(LIBRARY_PATH_VARIBALES OFF "${LIBRARY_PATH}/StringVariable/build/libStringVariablesStatic.a")
|
||||
#resolve_library(LIBRARY_PATH_YAML OFF "${LIBRARY_PATH}/yaml-cpp/build/libyaml-cpp.a")
|
||||
#resolve_library(LIBRARY_PATH_JSON OFF "${LIBRARY_PATH}/jsoncpp/build/src/lib_json/libjsoncpp.a")
|
||||
#resolve_library(LIBRARY_PATH_ED255 OFF "${LIBRARY_PATH}/ed25519/build/libed25519.a")
|
||||
#resolve_library(LIBRARY_PATH_DATA_PIPES OFF "${LIBRARY_PATH}/DataPipes/build/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-release/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-debug/libDataPipes.so")
|
||||
#resolve_library(LIBRARY_PATH_OPUS OFF "${LIBRARY_PATH}/opus/build/.libs/libopus.a")
|
||||
resolve_library(LIBRARY_PATH_NICE OFF "${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/lib/libnice.a")
|
||||
message("Found libnice at ${LIBRARY_PATH_NICE}")
|
||||
|
||||
@ -66,7 +90,7 @@ else()
|
||||
message(FATAL_ERROR "Failed to find glibc")
|
||||
endif ()
|
||||
message("Found GLIBC lib dir at ${GLIBC_LIB_DIR}")
|
||||
set(LIBRARY_PATH_GLIBC "${GLIBC_LIB_DIR}/libgio-2.0.a;${GLIBC_LIB_DIR}/libgmodule-2.0.a;${GLIBC_LIB_DIR}/libglib-2.0.a;${GLIBC_LIB_DIR}/libgobject-2.0.a;${GLIBC_LIB_DIR}/libffi.a;resolv")
|
||||
set(LIBRARY_PATH_GLIBC "${GLIBC_LIB_DIR}/libgio-2.0.a;${GLIBC_LIB_DIR}/libgmodule-2.0.a;${GLIBC_LIB_DIR}/libgobject-2.0.a;${GLIBC_LIB_DIR}/libglib-2.0.a;${GLIBC_LIB_DIR}/libffi.a;resolv")
|
||||
|
||||
add_definitions(-DINET -DINET6)
|
||||
add_subdirectory(shared/)
|
||||
|
@ -247,19 +247,18 @@ file(WRITE repro/env/buildVersion.txt "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PA
|
||||
|
||||
add_executable(TeaSpeakServer ${SERVER_SOURCE_FILES})
|
||||
target_link_libraries(TeaSpeakServer
|
||||
${LIBRARY_PATH_THREAD_POOL} #Static
|
||||
threadpool::static #Static
|
||||
TeaSpeak #Static
|
||||
TeaLicenseHelper #Static
|
||||
TeaMusic #Static
|
||||
${LIBRARY_PATH_TERMINAL} #Static
|
||||
${LIBRARY_PATH_VARIBALES}
|
||||
${LIBRARY_PATH_YAML}
|
||||
CXXTerminal::static #Static
|
||||
${StringVariable_LIBRARIES_STATIC}
|
||||
${YAML_CPP_LIBRARIES}
|
||||
pthread
|
||||
stdc++fs
|
||||
${LIBEVENT_PATH}/libevent.a
|
||||
${LIBEVENT_PATH}/libevent_pthreads.a
|
||||
${LIBRARY_PATH_OPUS}
|
||||
${LIBRARY_PATH_JSON}
|
||||
event_static event_pthreads
|
||||
opus::static
|
||||
yaml-cpp
|
||||
${LIBRARY_PATH_PROTOBUF}
|
||||
|
||||
#We're forsed to use boringssl caused by the fact that boringssl is already within webrtc!
|
||||
@ -267,22 +266,22 @@ target_link_libraries(TeaSpeakServer
|
||||
#Require a so
|
||||
sqlite3
|
||||
|
||||
${LIBRARY_PATH_BREAKPAD}
|
||||
${LIBRARY_PATH_PROTOBUF}
|
||||
breakpad::static
|
||||
protobuf::libprotobuf
|
||||
jemalloc::shared
|
||||
|
||||
#${LIBWEBRTC_LIBRARIES} #ATTENTIAN! WebRTC does not work with crypto! (Already contains a crypto version)
|
||||
${LIBRARY_TOM_CRYPT}
|
||||
${LIBRARY_TOM_MATH}
|
||||
tomcrypt::static
|
||||
tommath::static
|
||||
|
||||
mysqlclient.a
|
||||
|
||||
${LIBRARY_PATH_ED255}
|
||||
jsoncpp_lib
|
||||
${ed25519_LIBRARIES_STATIC}
|
||||
)
|
||||
|
||||
if (${COMPILE_WEB_CLIENT})
|
||||
find_package(UsrSCTP REQUIRED)
|
||||
target_link_libraries(TeaSpeakServer
|
||||
${LIBRARY_PATH_DATA_PIPES}
|
||||
${DataPipes_LIBRARIES_SHARED}
|
||||
${LIBRARY_PATH_NICE}
|
||||
${LIBRARY_PATH_GLIBC}
|
||||
)
|
||||
@ -291,8 +290,8 @@ if(${COMPILE_WEB_CLIENT})
|
||||
endif ()
|
||||
include_directories(${LIBRARY_PATH}/boringssl/include/)
|
||||
target_link_libraries(TeaSpeakServer
|
||||
${LIBRARY_PATH_BORINGSSL_SSL}
|
||||
${LIBRARY_PATH_BORINGSSL_CRYPTO}
|
||||
openssl::ssl::shared
|
||||
openssl::crypto::shared
|
||||
dl
|
||||
z
|
||||
)
|
||||
|
@ -540,10 +540,10 @@ namespace ts {
|
||||
CommandResult handleCommandMusicBotPlayerInfo(Command&); //TODO: Use cached permission values
|
||||
CommandResult handleCommandMusicBotPlayerAction(Command&); //TODO: Use cached permission values
|
||||
|
||||
CommandResult handleCommandMusicBotQueueList(Command&); //TODO: Use cached permission values
|
||||
CommandResult handleCommandMusicBotQueueAdd(Command&); //TODO: Use cached permission values
|
||||
CommandResult handleCommandMusicBotQueueRemove(Command&); //TODO: Use cached permission values
|
||||
CommandResult handleCommandMusicBotQueueReorder(Command&); //TODO: Use cached permission values
|
||||
command_result handleCommandMusicBotQueueList(Command&); //TODO: Use cached permission values
|
||||
command_result handleCommandMusicBotQueueAdd(Command&); //TODO: Use cached permission values
|
||||
command_result handleCommandMusicBotQueueRemove(Command&); //TODO: Use cached permission values
|
||||
command_result handleCommandMusicBotQueueReorder(Command&); //TODO: Use cached permission values
|
||||
|
||||
CommandResult handleCommandMusicBotPlaylistAssign(Command&);
|
||||
|
||||
|
@ -330,10 +330,10 @@ CommandResult ConnectedClient::handleCommand(Command &cmd) {
|
||||
else if (command == "musicbotsetsubscription") return this->handleCommandMusicBotSetSubscription(cmd);
|
||||
else if (command == "musicbotplayerinfo") return this->handleCommandMusicBotPlayerInfo(cmd);
|
||||
else if (command == "musicbotplayeraction") return this->handleCommandMusicBotPlayerAction(cmd);
|
||||
else if (command == "musicbotqueuelist") return this->handleCommandMusicBotQueueList(cmd);
|
||||
else if (command == "musicbotqueueadd") return this->handleCommandMusicBotQueueAdd(cmd);
|
||||
else if (command == "musicbotqueueremove") return this->handleCommandMusicBotQueueRemove(cmd);
|
||||
else if (command == "musicbotqueuereorder") return this->handleCommandMusicBotQueueReorder(cmd);
|
||||
else if (command == "musicbotqueuelist") return this->handleCommandMusicBotQueueList(cmd).as_command_result();
|
||||
else if (command == "musicbotqueueadd") return this->handleCommandMusicBotQueueAdd(cmd).as_command_result();
|
||||
else if (command == "musicbotqueueremove") return this->handleCommandMusicBotQueueRemove(cmd).as_command_result();
|
||||
else if (command == "musicbotqueuereorder") return this->handleCommandMusicBotQueueReorder(cmd).as_command_result();
|
||||
else if (command == "musicbotplaylistassign") return this->handleCommandMusicBotPlaylistAssign(cmd);
|
||||
|
||||
else if (command == "help") return this->handleCommandHelp(cmd);
|
||||
@ -5738,7 +5738,7 @@ CommandResult ConnectedClient::handleCommandVersion(Command &) {
|
||||
res["version"] = build::version()->string(false);
|
||||
res["build_count"] = build::buildCount();
|
||||
res["build"] = duration_cast<seconds>(build::version()->timestamp.time_since_epoch()).count();
|
||||
#ifdef WINDOWS
|
||||
#ifdef WIN32
|
||||
res["platform"] = "Windows";
|
||||
#else
|
||||
res["platform"] = "Linux";
|
||||
@ -7114,8 +7114,8 @@ CommandResult ConnectedClient::handleCommandPlaylistSongRemove(ts::Command &cmd)
|
||||
return CommandResult::Success;
|
||||
}
|
||||
|
||||
CommandResult ConnectedClient::handleCommandMusicBotQueueList(Command& cmd) {
|
||||
return CommandResult::NotImplemented; //FIXME
|
||||
command_result ConnectedClient::handleCommandMusicBotQueueList(Command& cmd) {
|
||||
return command_result{error::not_implemented}; //FIXME
|
||||
|
||||
/*
|
||||
CMD_REQ_SERVER;
|
||||
@ -7195,8 +7195,8 @@ CommandResult ConnectedClient::handleCommandMusicBotQueueList(Command& cmd) {
|
||||
*/
|
||||
}
|
||||
|
||||
CommandResult ConnectedClient::handleCommandMusicBotQueueAdd(Command& cmd) {
|
||||
return CommandResult::NotImplemented; //FIXME
|
||||
command_result ConnectedClient::handleCommandMusicBotQueueAdd(Command& cmd) {
|
||||
return command_result{error::not_implemented}; //FIXME
|
||||
|
||||
/*
|
||||
CMD_REQ_SERVER;
|
||||
@ -7231,8 +7231,8 @@ CommandResult ConnectedClient::handleCommandMusicBotQueueAdd(Command& cmd) {
|
||||
*/
|
||||
}
|
||||
|
||||
CommandResult ConnectedClient::handleCommandMusicBotQueueRemove(Command& cmd) {
|
||||
return CommandResult::NotImplemented; //FIXME
|
||||
command_result ConnectedClient::handleCommandMusicBotQueueRemove(Command& cmd) {
|
||||
return command_result{error::not_implemented}; //FIXME
|
||||
|
||||
/*
|
||||
CMD_REQ_SERVER;
|
||||
@ -7263,8 +7263,8 @@ CommandResult ConnectedClient::handleCommandMusicBotQueueRemove(Command& cmd) {
|
||||
*/
|
||||
}
|
||||
|
||||
CommandResult ConnectedClient::handleCommandMusicBotQueueReorder(Command& cmd) {
|
||||
return CommandResult::NotImplemented; //FIXME
|
||||
command_result ConnectedClient::handleCommandMusicBotQueueReorder(Command& cmd) {
|
||||
return command_result{error::not_implemented}; //FIXME
|
||||
|
||||
/*
|
||||
CMD_REQ_SERVER;
|
||||
|
2
shared
2
shared
@ -1 +1 @@
|
||||
Subproject commit b85c51951cd01b3535b9dd782908d02cac8f1455
|
||||
Subproject commit 73f292f9517c82260a5d1b6e3beee3cfcf0a6f5f
|
Loading…
Reference in New Issue
Block a user