From 090f13b334fccfa8026c0683c28a444eadb1b0e6 Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 14 Jan 2020 13:44:14 +0800 Subject: [PATCH 1/5] Fix CMake files to allow build server only --- CMakeLists.txt | 8 ++--- cmake/FindLuaJit.cmake | 1 + cmake/FindRakNet.cmake | 2 +- cmake/FindSDL2.cmake | 1 + components/CMakeLists.txt | 62 +++++++++++++++++++++++---------------- 5 files changed, 43 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ceb4b2c5b..7cd567a67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,11 +266,12 @@ if(NOT HAVE_STDINT_H) message(FATAL_ERROR "stdint.h was not found" ) endif() - -IF(BUILD_OPENMW OR BUILD_OPENCS) - +if(BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_MP) find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgParticle osgUtil osgFX osgShadow) include_directories(SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS}) +endif() + +IF(BUILD_OPENMW OR BUILD_OPENCS) set(USED_OSG_PLUGINS osgdb_bmp @@ -648,7 +649,6 @@ endif(WIN32) # Extern IF(BUILD_OPENMW OR BUILD_OPENCS) set(RECASTNAVIGATION_STATIC ON CACHE BOOL "Build recastnavigation static libraries") - add_subdirectory (extern/recastnavigation EXCLUDE_FROM_ALL) add_subdirectory (extern/osg-ffmpeg-videoplayer) add_subdirectory (extern/oics) diff --git a/cmake/FindLuaJit.cmake b/cmake/FindLuaJit.cmake index 1004e52ec..9bc5ceb25 100644 --- a/cmake/FindLuaJit.cmake +++ b/cmake/FindLuaJit.cmake @@ -7,6 +7,7 @@ include(LibFindMacros) libfind_pkg_detect(LuaJit luajit FIND_PATH luajit.h + PATH_SUFFIXES luajit FIND_LIBRARY NAMES luajit-5.1 luajit ) diff --git a/cmake/FindRakNet.cmake b/cmake/FindRakNet.cmake index 27a22e823..a1d4c8f76 100644 --- a/cmake/FindRakNet.cmake +++ b/cmake/FindRakNet.cmake @@ -18,7 +18,7 @@ FIND_LIBRARY (RakNet_LIBRARY_RELEASE NAMES RakNetLibStatic $ENV{RAKNET_ROOT}/lib ) -FIND_LIBRARY (RakNet_LIBRARY_DEBUG NAMES RakNetLibStatic +FIND_LIBRARY (RakNet_LIBRARY_DEBUG NAMES RakNetLibStaticd PATHS ENV LD_LIBRARY_PATH ENV LIBRARY_PATH diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake index 4f2be8c42..dd84d7973 100644 --- a/cmake/FindSDL2.cmake +++ b/cmake/FindSDL2.cmake @@ -60,6 +60,7 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(LibFindMacros) if (CMAKE_SIZEOF_VOID_P EQUAL 8) set(_sdl_lib_suffix lib/x64) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 0481b9439..da22066ba 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -91,9 +91,11 @@ add_component_dir (misc gcd constants utf8stream stringops resourcehelpers rng messageformatparser weakcache ) -add_component_dir (debug - debugging debuglog - ) +if (BUILD_OPENMW OR BUILD_OPENCS) + add_component_dir(debug + debugging debuglog + ) +endif () IF(NOT WIN32 AND NOT APPLE) add_definitions(-DGLOBAL_DATA_PATH="${GLOBAL_DATA_PATH}") @@ -217,28 +219,32 @@ add_component_dir (fallback ) if(NOT WIN32 AND NOT ANDROID) - add_component_dir (crashcatcher - crashcatcher - ) + if (BUILD_OPENMW OR BUILD_OPENCS) + add_component_dir (crashcatcher + crashcatcher + ) + endif() endif() -add_component_dir(detournavigator - debug - makenavmesh - findsmoothpath - recastmeshbuilder - recastmeshmanager - cachedrecastmeshmanager - navmeshmanager - navigatorimpl - asyncnavmeshupdater - chunkytrimesh - recastmesh - tilecachedrecastmeshmanager - recastmeshobject - navmeshtilescache - settings - ) +add_component_dir(settings) + +if (BUILD_OPENMW OR BUILD_OPENCS) + add_component_dir(detournavigator + makenavmesh + findsmoothpath + recastmeshbuilder + recastmeshmanager + cachedrecastmeshmanager + navmeshmanager + navigatorimpl + asyncnavmeshupdater + chunkytrimesh + recastmesh + tilecachedrecastmeshmanager + recastmeshobject + navmeshtilescache + ) +endif() set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui ) @@ -303,11 +309,15 @@ target_link_libraries(components ${OPENGL_gl_LIBRARY} ${MyGUI_LIBRARIES} ${BSAOPTHASH_LIBRARIES} - RecastNavigation::DebugUtils - RecastNavigation::Detour - RecastNavigation::Recast ) +if (BUILD_OPENMW OR BUILD_OPENCS) + target_link_libraries(components + RecastNavigation::DebugUtils + RecastNavigation::Detour + RecastNavigation::Recast) +endif () + if (WIN32) target_link_libraries(components ${Boost_LOCALE_LIBRARY} From b9da8431963e000a3e30ca4a306f1ad1ebbb30f9 Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 14 Jan 2020 13:44:54 +0800 Subject: [PATCH 2/5] Add forgotten stdexcept include --- components/openmw-mp/Base/BasePacketProcessor.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/openmw-mp/Base/BasePacketProcessor.hpp b/components/openmw-mp/Base/BasePacketProcessor.hpp index 634de91e2..6020afc22 100644 --- a/components/openmw-mp/Base/BasePacketProcessor.hpp +++ b/components/openmw-mp/Base/BasePacketProcessor.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #define BPP_INIT(packet_id) packetID = packet_id; strPacketID = #packet_id; className = typeid(this).name(); avoidReading = false; From 61ef177d485cb6ddd27305ea3f7915e771c4307d Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 14 Jan 2020 15:49:28 +0800 Subject: [PATCH 3/5] Build debug, debugging and debuglog for all targets The server will require SDL2 --- CMakeLists.txt | 2 +- components/CMakeLists.txt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cd567a67..a7e6f1abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,6 +269,7 @@ endif() if(BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_MP) find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgParticle osgUtil osgFX osgShadow) include_directories(SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS}) + find_package(SDL2 REQUIRED) endif() IF(BUILD_OPENMW OR BUILD_OPENCS) @@ -316,7 +317,6 @@ IF(BUILD_OPENMW OR BUILD_OPENCS) endif() find_package(MyGUI 3.2.2 REQUIRED) - find_package(SDL2 REQUIRED) find_package(OpenAL REQUIRED) find_package(Bullet ${REQUIRED_BULLET_VERSION} REQUIRED COMPONENTS BulletCollision LinearMath) ELSE() diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index da22066ba..d540b135c 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -91,11 +91,10 @@ add_component_dir (misc gcd constants utf8stream stringops resourcehelpers rng messageformatparser weakcache ) -if (BUILD_OPENMW OR BUILD_OPENCS) - add_component_dir(debug - debugging debuglog - ) -endif () +add_component_dir(debug + debugging debuglog + ) + IF(NOT WIN32 AND NOT APPLE) add_definitions(-DGLOBAL_DATA_PATH="${GLOBAL_DATA_PATH}") From 09cb990c28dcf1f1c59421cda3cb9615f9e4a745 Mon Sep 17 00:00:00 2001 From: Testman Date: Thu, 16 Jan 2020 17:00:06 +0100 Subject: [PATCH 4/5] It's current year inb4 Current Year Fallacy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f648b159..0cf79e491 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ TES3MP ====== Copyright (c) 2008-2015, OpenMW Team -Copyright (c) 2016-2019, Stanislav Zhukov & David Cernat +Copyright (c) 2016-2020, Stanislav Zhukov & David Cernat [![Build Status](https://travis-ci.org/TES3MP/openmw-tes3mp.svg?branch=0.7.0)](https://travis-ci.org/TES3MP/openmw-tes3mp) From 02668cd45d8e252648a8a31cd7b3a8b9d7ab5296 Mon Sep 17 00:00:00 2001 From: Koncord Date: Sun, 19 Jan 2020 14:29:37 +0800 Subject: [PATCH 5/5] Add accidentally forgotten files to build --- components/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index d540b135c..ec7de71e1 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -229,6 +229,7 @@ add_component_dir(settings) if (BUILD_OPENMW OR BUILD_OPENCS) add_component_dir(detournavigator + debug makenavmesh findsmoothpath recastmeshbuilder @@ -242,6 +243,7 @@ if (BUILD_OPENMW OR BUILD_OPENCS) tilecachedrecastmeshmanager recastmeshobject navmeshtilescache + settings ) endif()