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) find_package(RakNet REQUIRED)
include_directories(${RakNet_INCLUDES}) 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 # Dependencies
if (USE_QT) if (USE_QT)
message(STATUS "Using Qt${DESIRED_QT_VERSION}") message(STATUS "Using Qt${DESIRED_QT_VERSION}")

@ -3,15 +3,12 @@ project(masterserver)
#set(CMAKE_CXX_STANDARD 14) #set(CMAKE_CXX_STANDARD 14)
add_definitions(-std=gnu++14) add_definitions(-std=gnu++14)
find_package(LuaJit REQUIRED) include_directories("./")
find_package(OpenSSL REQUIRED)
include_directories("./" ${LUAJIT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/extern/sol ${OPENSSL_INCLUDE_DIR})
set(SOURCE_FILES main.cpp MasterServer.cpp MasterServer.hpp RestServer.cpp RestServer.hpp AdminRest.cpp) set(SOURCE_FILES main.cpp MasterServer.cpp MasterServer.hpp RestServer.cpp RestServer.hpp AdminRest.cpp)
add_executable(masterserver ${SOURCE_FILES}) 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) option(BUILD_MASTER_TEST "build master server test program" OFF)

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

@ -1,7 +1,7 @@
#include <iostream> #include <iostream>
#include <Kbhit.h> #include <Kbhit.h>
#include <RakSleep.h> #include <RakSleep.h>
#include <extern/sol/sol.hpp> #include <sol.hpp>
#include "MasterServer.hpp" #include "MasterServer.hpp"
#include "RestServer.hpp" #include "RestServer.hpp"
#include "AdminRest.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") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_LUA")
include_directories(${LuaJit_INCLUDE_DIR} ${Sol2_INCLUDE_DIR})
# local files # local files
set(SERVER set(SERVER

@ -207,7 +207,7 @@ add_component_dir (fallback
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui 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) if (USE_QT)
add_component_qt_dir (contentselector add_component_qt_dir (contentselector
model/modelitem model/esmfile model/modelitem model/esmfile
@ -234,7 +234,7 @@ if (USE_QT)
QT5_WRAP_CPP(MOC_SRCS ${COMPONENT_MOC_FILES}) QT5_WRAP_CPP(MOC_SRCS ${COMPONENT_MOC_FILES})
endif() endif()
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_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE) if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE)

Loading…
Cancel
Save