Skip to content

Commit 25827c7

Browse files
authored
Merge pull request #1 from Blizzard/master
Merging from origin
2 parents ac349a1 + 614acc0 commit 25827c7

File tree

748 files changed

+3078
-57472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

748 files changed

+3078
-57472
lines changed

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*.app
2121

2222
build/
23+
build_*/
2324

2425
*.swp
2526

@@ -52,4 +53,8 @@ CodeAnalyst/
5253
project/include
5354
project/lib
5455

55-
.DS_Store
56+
.DS_Store
57+
58+
docs/html
59+
docs/latex
60+
doxygen.log

.gitmodules

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
[submodule "contrib/civetweb"]
2+
path = contrib/civetweb
3+
url = https://github.com/Blizzard/civetweb
14
[submodule "contrib/protobuf"]
25
path = contrib/protobuf
36
url = https://github.com/google/protobuf
47
[submodule "contrib/SDL-mirror"]
58
path = contrib/SDL-mirror
69
url = https://github.com/spurious/SDL-mirror
7-
[submodule "contrib/civetweb"]
8-
path = contrib/civetweb
9-
url = https://github.com/KevinCalderone/civetweb
1010
[submodule "protocol"]
1111
path = protocol
1212
url = https://github.com/Blizzard/s2client-proto
13+
[submodule "contrib/ipv6-parse"]
14+
path = contrib/ipv6-parse
15+
url = https://github.com/jrepp/ipv6-parse

.travis.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
sudo: true
2+
language: cpp
3+
compiler: gcc
4+
dist: trusty
5+
6+
branches:
7+
only:
8+
- master
9+
- /blizzard_internal.*/
10+
except:
11+
- gh-pages
12+
13+
before_install:
14+
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test # For C++14
15+
- sudo apt-get -qq update
16+
17+
install:
18+
- sudo apt-get install -y g++-5
19+
- sudo apt-get install doxygen
20+
- sudo apt-get install doxygen-doc
21+
- sudo apt-get install doxygen-latex
22+
- sudo apt-get install doxygen-gui
23+
- sudo apt-get install graphviz
24+
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 90
25+
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
26+
27+
script:
28+
- mkdir build
29+
- cd build
30+
- cmake ../
31+
- make
32+
33+
after_success:
34+
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && cd $TRAVIS_BUILD_DIR && ./generate_and_deploy_doxygen.sh'

CMakeLists.txt

+63-8
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,72 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
1919
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
2020
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/bin)
2121

22+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${PROJECT_BINARY_DIR}/bin)
23+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${PROJECT_BINARY_DIR}/bin)
24+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${PROJECT_BINARY_DIR}/bin)
25+
26+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${PROJECT_BINARY_DIR}/bin)
27+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${PROJECT_BINARY_DIR}/bin)
28+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${PROJECT_BINARY_DIR}/bin)
29+
2230
# Build with c++14 support.
2331
set(CMAKE_CXX_STANDARD 14)
2432

33+
# Disable default libraries in visual studio
34+
if (MSVC)
35+
# Default to statically-linked runtime.
36+
if("${MSVC_RUNTIME}" STREQUAL "")
37+
set(MSVC_RUNTIME "static")
38+
endif()
39+
40+
# Set compiler options.
41+
set(variables
42+
CMAKE_C_FLAGS_DEBUG
43+
CMAKE_C_FLAGS_MINSIZEREL
44+
CMAKE_C_FLAGS_RELEASE
45+
CMAKE_C_FLAGS_RELWITHDEBINFO
46+
CMAKE_CXX_FLAGS_DEBUG
47+
CMAKE_CXX_FLAGS_MINSIZEREL
48+
CMAKE_CXX_FLAGS_RELEASE
49+
CMAKE_CXX_FLAGS_RELWITHDEBINFO
50+
)
51+
if(${MSVC_RUNTIME} STREQUAL "static")
52+
message(STATUS
53+
"MSVC -> forcing use of statically-linked runtime."
54+
)
55+
foreach(variable ${variables})
56+
if(${variable} MATCHES "/MD")
57+
string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
58+
endif()
59+
endforeach()
60+
else()
61+
message(STATUS
62+
"MSVC -> forcing use of dynamically-linked runtime."
63+
)
64+
foreach(variable ${variables})
65+
if(${variable} MATCHES "/MT")
66+
string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
67+
endif()
68+
endforeach()
69+
endif()
70+
endif ()
71+
2572
# Allow creating filters for projects in visual studio.
2673
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
2774

75+
# -- Settings for building civetweb
2876
# Don't build civetweb tests.
29-
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
77+
set(CIVETWEB_BUILD_TESTING OFF CACHE BOOL "" FORCE)
3078
set(CIVETWEB_ENABLE_WEBSOCKETS ON CACHE BOOL "" FORCE)
79+
set(CIVETWEB_ENABLE_SERVER_EXECUTABLE OFF CACHE BOOL "" FORCE)
80+
set(CIVETWEB_ENABLE_IPV6 ON CACHE BOOL "" FORCE)
3181

3282
# Don't build civetweb with sanitizers
3383
set(CIVETWEB_ENABLE_ASAN OFF CACHE BOOL "" FORCE)
3484

85+
# Settings for ipv6 parse library
86+
set(IPV6_PARSE_LIBRARY_ONLY ON CACHE BOOL "" FORCE)
87+
3588
# Don't build protobuf tests.
3689
set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)
3790
set(protobuf_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
@@ -42,27 +95,29 @@ set(SDL_SHARED OFF CACHE BOOL "" FORCE)
4295
# Run civetwebs cmake.
4396
add_subdirectory("contrib/civetweb")
4497

45-
# TODO: This generates a cmake warning but we don't
46-
# want to include it in the project.
47-
#set_target_properties(c-executable PROPERTIES FOLDER contrib)
48-
set_target_properties(c-executable PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
49-
set_target_properties(c-library c-executable PROPERTIES FOLDER contrib)
98+
# Enable IPv6 in civetweb
99+
target_compile_options(civetweb-c-library PUBLIC -DUSE_IPV6=1)
50100

51101
# Run protobufs cmake.
52102
add_subdirectory("contrib/protobuf/cmake")
53103

104+
# Run ipv6-parse cmake.
105+
add_subdirectory("contrib/ipv6-parse")
106+
107+
set_target_properties(civetweb-c-library PROPERTIES FOLDER contrib)
54108
set_target_properties(libprotobuf PROPERTIES FOLDER contrib)
55109
set_target_properties(libprotobuf-lite PROPERTIES FOLDER contrib)
56110
set_target_properties(libprotoc PROPERTIES FOLDER contrib)
57111
set_target_properties(protoc PROPERTIES FOLDER contrib)
112+
set_target_properties(ipv6-parse PROPERTIES FOLDER contrib)
58113

59-
if (WIN32)
114+
if (MSVC)
60115
set_target_properties(libprotobuf libprotobuf-lite libprotoc protoc PROPERTIES COMPILE_FLAGS "/W0")
61116
set_source_files_properties(${libprotobuf_files} PROPERTIES COMPILE_FLAGS "/W0")
62117
set_source_files_properties(${protobuf_SHARED_OR_STATIC} PROPERTIES COMPILE_FLAGS "/W0")
63118
set_source_files_properties(${libprotobuf_lite_files} PROPERTIES COMPILE_FLAGS "/W0")
64119
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
65-
endif (WIN32)
120+
endif (MSVC)
66121

67122
# Exclude SDL and related projects to work around linker issue.
68123
if (NOT APPLE)

0 commit comments

Comments
 (0)