1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
Description: Use system lua library instead of building a local copy
Author: Felix Geyer <fgeyer@debian.org>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,6 @@
add_subdirectory(data)
add_subdirectory(src)
-add_subdirectory(deps)
add_subdirectory(linux)
--- a/src/ScriptedInputSource.cpp
+++ b/src/ScriptedInputSource.cpp
@@ -26,7 +26,7 @@
#include <SDL.h>
-#include "lua.hpp"
+#include <lua5.3/lua.hpp>
#include "DuelMatch.h"
#include "DuelMatchState.h"
--- a/src/GameLogic.cpp
+++ b/src/GameLogic.cpp
@@ -26,7 +26,7 @@
#include <iostream>
#include <utility>
-#include "lua.hpp"
+#include <lua5.3/lua.hpp>
#include "FileRead.h"
#include "GameLogicState.h"
--- a/src/FileRead.cpp
+++ b/src/FileRead.cpp
@@ -30,7 +30,7 @@
#include <boost/algorithm/string.hpp>
#include "tinyxml2.h"
-#include "lua.hpp"
+#include <lua.hpp>
/* implementation */
--- a/src/IScriptableComponent.cpp
+++ b/src/IScriptableComponent.cpp
@@ -1,6 +1,6 @@
#include "IScriptableComponent.h"
-#include "lua.hpp"
+#include <lua.hpp>
#include "Global.h"
#include "GameConstants.h"
@@ -323,4 +323,4 @@
void IScriptableComponent::setMatchState(const DuelMatchState& state) {
mCachedState = state;
-}
\ No newline at end of file
+}
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -84,6 +84,7 @@
find_package(Boost REQUIRED)
find_package(OpenGL)
+find_package(Lua REQUIRED)
add_subdirectory(raknet)
add_subdirectory(blobnet)
@@ -100,7 +102,7 @@
add_definitions("-DBLOBBY_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/blobby\"")
endif()
-set(BLOBBY_COMMON_LIBS lua::lua blobnet::blobnet tinyxml2::tinyxml2 PhysFS::PhysFS SDL2::SDL2main SDL2::SDL2 Boost::boost)
+set(BLOBBY_COMMON_LIBS ${LUA_LIBRARIES} blobnet::blobnet tinyxml2::tinyxml2 PhysFS::PhysFS SDL2::SDL2main SDL2::SDL2 Boost::boost)
# other additional dependencies
if (NOT WIN32)
@@ -130,11 +132,13 @@
endif ()
endif ()
+target_include_directories(blobby PRIVATE ${LUA_INCLUDE_DIR})
target_link_libraries(blobby ${BLOBBY_COMMON_LIBS} ${OPENGL_LIBRARIES})
if (UNIX AND (NOT ANDROID) OR WIN32)
add_executable(blobby-server ${blobby-server_SRC})
+ target_include_directories(blobby-server PRIVATE ${LUA_INCLUDE_DIR})
target_link_libraries(blobby-server ${BLOBBY_COMMON_LIBS})
endif ()
if (UNIX AND (NOT ANDROID))
|