summaryrefslogtreecommitdiffstats
path: root/src/Protocol/CMakeLists.txt
blob: 42a7d5a9d853b760ea17e262652d4affe9168d12 (plain) (blame)
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

cmake_minimum_required (VERSION 2.6)
project (MCServer)

include_directories ("${PROJECT_SOURCE_DIR}/../")

SET (SRCS
	Authenticator.cpp
	ChunkDataSerializer.cpp
	MojangAPI.cpp
	Packetizer.cpp
	Protocol17x.cpp
	Protocol18x.cpp
	ProtocolRecognizer.cpp
)

SET (HDRS
	Authenticator.h
	ChunkDataSerializer.h
	MojangAPI.h
	Packetizer.h
	Protocol.h
	Protocol17x.h
	Protocol18x.h
	ProtocolRecognizer.h
)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
	set_source_files_properties(ChunkDataSerializer.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
	set_source_files_properties(MojangAPI.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
	set_source_files_properties(Packetizer.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
	set_source_files_properties(Protocol18x.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast -Wno-error=sign-conversion -Wno-error=conversion -Wno-error=switch-enum -Wno-error=switch")
	set_source_files_properties(Protocol17x.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=switch-enum -Wno-error=old-style-cast")
	set_source_files_properties(ProtocolRecognizer.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
endif()

if (NOT MSVC)
	add_library(Protocol ${SRCS} ${HDRS})
endif()