-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (51 loc) · 1.48 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required(VERSION 3.18)
project(BeamMP-Protocol)
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_CXX_STANDARD 20)
set(SOURCES
include/ClientInfo.h
include/ClientPacket.h
include/ClientState.h
include/ClientTransport.h
include/Compression.h
include/Hash.h
include/ImplementationInfo.h
include/ModRequest.h
include/ModResponse.h
include/Packet.h
include/ProtocolVersion.h
include/ServerInfo.h
include/State.h
include/Transport.h
include/Util.h
include/Version.h
src/ClientInfo.cpp
src/ClientPacket.cpp
src/ClientTransport.cpp
src/Compression.cpp
src/Hash.cpp
src/ImplementationInfo.cpp
src/ModRequest.cpp
src/ModResponse.cpp
src/Packet.cpp
src/ProtocolVersion.cpp
src/ServerInfo.cpp
src/tests.cpp
src/Transport.cpp
src/Version.cpp
)
add_library(protocol STATIC
${SOURCES})
find_package(zstd REQUIRED)
target_link_libraries(protocol zstd::libzstd_static)
target_include_directories(protocol PUBLIC include)
target_compile_options(protocol PRIVATE -DDOCTEST_CONFIG_DISABLE=1)
if (NOT BEAMMP_NO_PROTOCOL_TESTS)
find_package(doctest REQUIRED)
add_executable(protocol-tests
src/tests.cpp
${SOURCES})
target_include_directories(protocol-tests PUBLIC include)
target_link_libraries(protocol-tests doctest::doctest zstd::libzstd_static)
endif()