Remove some duplication, standardize sol2 header inclusion

sol2-server-rewrite
Kyle Cooley 7 years ago
parent ba4d2bd5fe
commit 7248a5d037

@ -140,6 +140,16 @@ endif()
find_package(RakNet REQUIRED)
include_directories(${RakNet_INCLUDES})
if (BUILD_OPENMW_MP OR BUILD_MASTER)
find_package(LuaJit REQUIRED)
find_package(Sol2 REQUIRED)
include_directories(${LuaJit_INCLUDE_DIRS} ${Sol2_INCLUDE_DIRS})
endif()
if (BUILD_MASTER)
find_package(OpenSSL REQUIRED)
include_directories(${OpenSSL_INCLUDE_DIRS})
endif()
# Dependencies
if (USE_QT)
message(STATUS "Using Qt${DESIRED_QT_VERSION}")

@ -3,15 +3,12 @@ project(masterserver)
#set(CMAKE_CXX_STANDARD 14)
add_definitions(-std=gnu++14)
find_package(LuaJit REQUIRED)
find_package(OpenSSL REQUIRED)
include_directories("./" ${LUAJIT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/extern/sol ${OPENSSL_INCLUDE_DIR})
include_directories("./")
set(SOURCE_FILES main.cpp MasterServer.cpp MasterServer.hpp RestServer.cpp RestServer.hpp AdminRest.cpp)
add_executable(masterserver ${SOURCE_FILES})
target_link_libraries(masterserver ${RakNet_LIBRARY} ${LUAJIT_LIBRARY} ${OPENSSL_LIBRARIES} components)
target_link_libraries(masterserver ${RakNet_LIBRARY} ${LuaJit_LIBRARIES} ${OPENSSL_LIBRARIES} components)
option(BUILD_MASTER_TEST "build master server test program" OFF)

@ -9,7 +9,7 @@
#include <chrono>
#include <RakPeerInterface.h>
#include <components/openmw-mp/Master/MasterData.hpp>
#include <extern/sol/sol.hpp>
#include <sol.hpp>
#include <mutex>
class MasterServer

@ -1,7 +1,7 @@
#include <iostream>
#include <Kbhit.h>
#include <RakSleep.h>
#include <extern/sol/sol.hpp>
#include <sol.hpp>
#include "MasterServer.hpp"
#include "RestServer.hpp"
#include "AdminRest.hpp"

@ -16,13 +16,7 @@ endif(ENABLE_BREAKPAD)
find_package(LuaJit REQUIRED)
find_package(Sol2 REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_LUA")
include_directories(${LuaJit_INCLUDE_DIR} ${Sol2_INCLUDE_DIR})
# local files
set(SERVER

@ -207,7 +207,7 @@ add_component_dir (fallback
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
)
IF(BUILD_OPENMW OR BUILD_OPENCS)
IF(BUILD_OPENMW OR BUILD_OPENCS OR BUILD_BROWSER)
if (USE_QT)
add_component_qt_dir (contentselector
model/modelitem model/esmfile
@ -234,7 +234,7 @@ if (USE_QT)
QT5_WRAP_CPP(MOC_SRCS ${COMPONENT_MOC_FILES})
endif()
endif()
ENDIF(BUILD_OPENMW OR BUILD_OPENCS)
ENDIF(BUILD_OPENMW OR BUILD_OPENCS OR BUILD_BROWSER)
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE)

Loading…
Cancel
Save