-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
76 lines (63 loc) · 2.31 KB
/
CMakeLists.txt
File metadata and controls
76 lines (63 loc) · 2.31 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cmake_minimum_required(VERSION 2.6)
set(cmake_archive_output_directory ${CMAKE_HOME_DIRECTORY}/bin)
set(cmake_library_output_directory ${CMAKE_HOME_DIRECTORY}/bin)
set(cmake_runtime_output_directory ${CMAKE_HOME_DIRECTORY}/bin)
project(MirrorSync3)
file( GLOB SOURCE_CODE
source/main.cpp
source/udpserver.cpp
source/udpserver.h
source/compute.cpp
source/compute.h
source/dataAnswer.cpp
source/dataAnswer.h
source/DataBase.cpp
source/DataBase.h
source/GameLogic.cpp
source/GameLogic.h
source/GameObject_List.cpp
source/GameObject_List.h
source/Logic.cpp
source/Logic.h
source/MyUtiles.cpp
source/MyUtiles.h
source/PackageRules.cpp
source/PlayerManager.cpp
source/PlayerManager.h
source/VehicleManager.cpp
source/VehicleManager.h
source/sender.cpp
source/sender.h
source/EventManager.cpp
source/EventManager.h
source/PackageType.h
source/BaseType.cpp
source/BaseType.h
)
source_group("" FILES ${SOURCE_CODE})
option(Boost_USE_STATIC_LIBS "Set to ON to force the use of the static libraries." ON)
option(Boost_USE_MULTITHREADED "Set to OFF to use the non-multithreaded libraries ('mt' tag)" ON)
option(Boost_USE_STATIC_RUNTIME "Set to ON or OFF to specify whether to use libraries linked statically to the C++ runtime ('s' tag) " ON)
option(Boost_USE_DEBUG_RUNTIME "Set to ON or OFF to specify whether to use libraries linked to the MS debug C++ runtime ('g' tag) " ON)
find_package(Boost COMPONENTS system filesystem program_options date_time regex thread chrono REQUIRED)
if(Boost_FOUND)
if(MSVC)
if (COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /Zi /Ob0 /Od /EHsc /RTC1 /D_DEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /O2 /Ob2")
add_definitions(-D _CRT_SECURE_NO_WARNINGS)
add_definitions(/sdl /EHsc /Od /RTC1 /GS)
endif()
if(UNIX)
add_definitions("-std=c++11")
add_definitions("-O3")
add_definitions("-static")
add_definitions("-static-libgcc")
add_definitions("-static-libstdc++")
endif()
include_directories(${Boost_INCLUDE_DIR})
add_executable(MirrorSync3 ${SOURCE_CODE})
target_link_libraries(MirrorSync3 ${Boost_LIBRARIES})
endif()