diff --git a/CMakeLists.txt b/CMakeLists.txt index f00e4e73d..6ffb547be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,11 +266,13 @@ 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}) + find_package(SDL2 REQUIRED) +endif() + +IF(BUILD_OPENMW OR BUILD_OPENCS) set(USED_OSG_PLUGINS osgdb_bmp @@ -315,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() @@ -650,7 +651,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/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) 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 123331d4a..61db7da18 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -91,9 +91,10 @@ add_component_dir (misc gcd constants utf8stream stringops resourcehelpers rng messageformatparser weakcache ) -add_component_dir (debug - debugging debuglog - ) +add_component_dir(debug + debugging debuglog + ) + IF(NOT WIN32 AND NOT APPLE) add_definitions(-DGLOBAL_DATA_PATH="${GLOBAL_DATA_PATH}") @@ -223,30 +224,34 @@ 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 - navigator - findrandompointaroundcircle - ) +if (BUILD_OPENMW OR BUILD_OPENCS) + add_component_dir(detournavigator + debug + makenavmesh + findsmoothpath + recastmeshbuilder + recastmeshmanager + cachedrecastmeshmanager + navmeshmanager + navigatorimpl + asyncnavmeshupdater + chunkytrimesh + recastmesh + tilecachedrecastmeshmanager + recastmeshobject + navmeshtilescache + settings + navigator + findrandompointaroundcircle + ) +endif() set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui ) @@ -310,11 +315,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} 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;