mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-23 08:27:06 +00:00
add socketio, http post & get
This commit is contained in:
committed by
Anonymous275
parent
4cda6e8bc3
commit
ef5db013b3
@@ -2,14 +2,24 @@ cmake_minimum_required(VERSION 3.13)
|
||||
project(Server)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||
|
||||
# this has to happen before -DDEBUG since it wont compile properly with -DDEBUG
|
||||
include_directories("asio/asio/include")
|
||||
include_directories("rapidjson/include")
|
||||
include_directories("websocketpp")
|
||||
add_subdirectory("socket.io-client-cpp")
|
||||
add_subdirectory("include/commandline")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||
|
||||
if (UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -static-libstdc++")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -g")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -s -fno-builtin")
|
||||
if (SANITIZE)
|
||||
message(STATUS "sanitize is ON")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined,thread")
|
||||
endif (SANITIZE)
|
||||
elseif (WIN32)
|
||||
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
|
||||
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
||||
@@ -19,23 +29,26 @@ endif ()
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS system thread)
|
||||
|
||||
add_executable(BeamMP-Server
|
||||
src/main.cpp
|
||||
src/TConsole.cpp
|
||||
src/TServer.cpp
|
||||
src/Compat.cpp
|
||||
src/Common.cpp
|
||||
src/Client.cpp
|
||||
src/VehicleData.cpp
|
||||
src/TConfig.cpp
|
||||
src/TLuaEngine.cpp
|
||||
src/TLuaFile.cpp
|
||||
)
|
||||
|
||||
add_executable(BeamMP-Server
|
||||
src/main.cpp
|
||||
include/TConsole.h src/TConsole.cpp
|
||||
include/TServer.h src/TServer.cpp
|
||||
include/Compat.h src/Compat.cpp
|
||||
include/Common.h src/Common.cpp
|
||||
include/Client.h src/Client.cpp
|
||||
include/VehicleData.h src/VehicleData.cpp
|
||||
include/TConfig.h src/TConfig.cpp
|
||||
include/TLuaEngine.h src/TLuaEngine.cpp
|
||||
include/TLuaFile.h src/TLuaFile.cpp
|
||||
include/TResourceManager.h src/TResourceManager.cpp
|
||||
include/THeartbeatThread.h src/THeartbeatThread.cpp
|
||||
include/Http.h src/Http.cpp
|
||||
include/SocketIO.h src/SocketIO.cpp)
|
||||
|
||||
target_include_directories(BeamMP-Server PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/commandline")
|
||||
|
||||
find_package(Lua REQUIRED)
|
||||
target_include_directories(BeamMP-Server PUBLIC ${Boost_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
||||
target_include_directories(BeamMP-Server PUBLIC ${Boost_INCLUDE_DIRS} ${LUA_INCLUDE_DIR} "socket.io-client-cpp/src")
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user