-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
|
||
add_library( | ||
mumble_server | ||
SHARED | ||
lib/server.cpp | ||
lib/server.hpp | ||
) | ||
generate_export_header(mumble_server) | ||
|
||
set_target_properties( | ||
mumble_server | ||
PROPERTIES | ||
CXX_STANDARD 23 | ||
CXX_STANDARD_REQUIRED ON | ||
CXX_EXTENSIONS OFF | ||
CXX_VISIBILITY_PRESET hidden | ||
VISIBILITY_INLINES_HIDDEN ON | ||
POSITION_INDEPENDENT_CODE ON | ||
INTERPROCEDURAL_OPTIMIZATION ${LTO_SUPPORTED} | ||
VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" | ||
SOVERSION 0 | ||
) | ||
|
||
target_include_directories( | ||
mumble_server | ||
PUBLIC lib | ||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} | ||
PUBLIC ${CMAKE_CURRENT_BINARY_DIR} | ||
) | ||
|
||
target_compile_definitions( | ||
mumble_server | ||
PUBLIC ASIO_NO_DEPRECATED | ||
) | ||
|
||
# enable extra warnings for our code | ||
target_compile_options( | ||
mumble_server | ||
PRIVATE | ||
$<$<CXX_COMPILER_ID:MSVC>:/W4> | ||
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic> | ||
) | ||
|
||
find_package(asio CONFIG REQUIRED) | ||
find_package(OpenSSL REQUIRED) | ||
find_package(spdlog CONFIG REQUIRED) | ||
find_package(Threads REQUIRED) | ||
|
||
target_link_libraries( | ||
mumble_server | ||
PUBLIC mumble_protocol_common | ||
PRIVATE asio::asio | ||
PRIVATE OpenSSL::SSL | ||
PRIVATE OpenSSL::Crypto | ||
PRIVATE spdlog::spdlog | ||
PRIVATE Threads::Threads | ||
) | ||
|
||
add_executable( | ||
mumble_server_app | ||
app/main.cpp | ||
) | ||
if (WIN32) | ||
target_sources( | ||
mumble_server_app | ||
PUBLIC | ||
app/application.manifest | ||
) | ||
endif () | ||
|
||
set_target_properties( | ||
mumble_server_app | ||
PROPERTIES | ||
CXX_STANDARD 23 | ||
CXX_STANDARD_REQUIRED ON | ||
CXX_EXTENSIONS OFF | ||
) | ||
|
||
find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED COMPONENTS program_options) | ||
target_link_libraries( | ||
mumble_server_app | ||
PRIVATE mumble_server | ||
PRIVATE Boost::boost | ||
PRIVATE Boost::program_options | ||
PRIVATE spdlog::spdlog | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<assemblyIdentity type="win32" name="mumble_server_app" version="6.0.0.0"/> | ||
<application> | ||
<windowsSettings> | ||
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> | ||
</windowsSettings> | ||
</application> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Created by JanHe on 03.04.2024. | ||
// | ||
|
||
#include <cstdlib> | ||
|
||
#include <server.hpp> | ||
|
||
int main(int argc, char *argv[]) { | ||
(void) argc; | ||
(void) argv; | ||
|
||
libmumble_protocol::server::MumbleServer mumble_server; | ||
|
||
return EXIT_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// Created by JanHe on 03.04.2024. | ||
// | ||
|
||
#include "server.hpp" | ||
|
||
#include <pimpl_impl.hpp> | ||
|
||
namespace libmumble_protocol::server { | ||
|
||
struct MumbleServer::Impl final {}; | ||
|
||
MumbleServer::MumbleServer() = default; | ||
|
||
MumbleServer::~MumbleServer() = default; | ||
|
||
}// namespace libmumble_protocol::server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Created by JanHe on 03.04.2024. | ||
// | ||
|
||
#ifndef LIBMUMBLE_PROTOCOL_SERVER_LIB_SERVER_HPP | ||
#define LIBMUMBLE_PROTOCOL_SERVER_LIB_SERVER_HPP | ||
|
||
#include "mumble_server_export.h" | ||
|
||
#include <pimpl.hpp> | ||
|
||
namespace libmumble_protocol::server { | ||
|
||
class MUMBLE_SERVER_EXPORT MumbleServer final { | ||
public: | ||
MumbleServer(); | ||
~MumbleServer(); | ||
|
||
private: | ||
struct Impl; | ||
libmumble_protocol::common::Pimpl<Impl> pimpl_; | ||
}; | ||
|
||
}// namespace libmumble_protocol::server | ||
|
||
#endif//LIBMUMBLE_PROTOCOL_SERVER_LIB_SERVER_HPP |