diff options
author | nat-goodspeed <nat@lindenlab.com> | 2023-12-14 09:25:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 09:25:54 -0500 |
commit | 5a6174c0853f5a140343725312f2b63b42f2bbad (patch) | |
tree | bd45777f18dcfb6818318adf8d24bf1e8e6e0263 /indra | |
parent | 7e08b334fe418324ef13284b5d5b8310cf9a4de7 (diff) | |
parent | 0a731cd765cb05820e5e08956ba66cc85e987d3c (diff) |
Merge pull request #11 from secondlife/DRTVWR-589-3p-lua
Merge 3p-lua use to trunk DRTVWR-589
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/Lualibs.cmake | 13 | ||||
-rw-r--r-- | indra/llcommon/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/llcommon/tests/StringVec.h | 10 | ||||
-rw-r--r-- | indra/llcommon/tests/lleventfilter_test.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/tests/llleap_test.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/tests/llsdserialize_test.cpp | 2 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 20 | ||||
-rw-r--r-- | indra/newview/llfloaterluadebug.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llluamanager.cpp | 7 | ||||
-rw-r--r-- | indra/newview/tests/llluamanager_test.cpp | 2 |
10 files changed, 26 insertions, 37 deletions
diff --git a/indra/cmake/Lualibs.cmake b/indra/cmake/Lualibs.cmake index ec40d0f41c..b6a7de41c6 100644 --- a/indra/cmake/Lualibs.cmake +++ b/indra/cmake/Lualibs.cmake @@ -8,8 +8,15 @@ add_library( ll::lualibs INTERFACE IMPORTED ) use_system_binary( lualibs ) -use_prebuilt_binary(lualibs) +use_prebuilt_binary(lua) -target_link_libraries(ll::lualibs INTERFACE ${lualibs}) +target_include_directories( ll::lualibs SYSTEM INTERFACE + ${LIBS_PREBUILT_DIR}/include +) -target_include_directories( ll::lualibs SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/lualibs) +if (WINDOWS) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/lua54.lib) +elseif (DARWIN) + target_link_libraries(ll::lualibs INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/liblua.a) +elseif (LINUX) +endif (WINDOWS) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 5dd4321330..ef4899978e 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -13,7 +13,6 @@ include(Copy3rdPartyLibs) include(ZLIBNG) include(URIPARSER) include(Tracy) -include(lualibs) set(llcommon_SOURCE_FILES diff --git a/indra/llcommon/tests/StringVec.h b/indra/llcommon/tests/StringVec.h index a380b00a05..761956a012 100644 --- a/indra/llcommon/tests/StringVec.h +++ b/indra/llcommon/tests/StringVec.h @@ -18,6 +18,16 @@ typedef std::vector<std::string> StringVec; +#if defined(LL_LLTUT_H) +// Modern compilers require us to define operator<<(std::ostream&, StringVec) +// before the definition of the ensure() template that engages it. The error +// stating that the compiler can't find a viable operator<<() is so perplexing +// that even though I've obviously hit it a couple times before, a new +// instance still caused much head-scratching. This warning is intended to +// demystify any inadvertent future recurrence. +#warning "StringVec.h must be #included BEFORE lltut.h for ensure() to work" +#endif + std::ostream& operator<<(std::ostream& out, const StringVec& strings) { out << '('; diff --git a/indra/llcommon/tests/lleventfilter_test.cpp b/indra/llcommon/tests/lleventfilter_test.cpp index fa2cb03e95..ed7cb56506 100644 --- a/indra/llcommon/tests/lleventfilter_test.cpp +++ b/indra/llcommon/tests/lleventfilter_test.cpp @@ -34,10 +34,10 @@ // std headers // external library headers // other Linden headers +#include "listener.h" #include "../test/lltut.h" #include "stringize.h" #include "llsdutil.h" -#include "listener.h" #include "tests/wrapllerrs.h" #include <typeinfo> diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 7197dedfbf..6fe9e3446f 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -18,6 +18,7 @@ #include <functional> // external library headers // other Linden headers +#include "StringVec.h" #include "../test/lltut.h" #include "../test/namedtempfile.h" #include "../test/catch_and_store_what_in.h" @@ -26,7 +27,6 @@ #include "llprocess.h" #include "llstring.h" #include "stringize.h" -#include "StringVec.h" #if defined(LL_WINDOWS) #define sleep(secs) _sleep((secs) * 1000) diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index ae3a94c55d..730731a927 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -53,10 +53,10 @@ typedef U32 uint32_t; #include "llmemorystream.h" #include "hexdump.h" +#include "StringVec.h" #include "../test/lltut.h" #include "../test/namedtempfile.h" #include "stringize.h" -#include "StringVec.h" #include <functional> typedef std::function<void(const LLSD& data, std::ostream& str)> FormatterFunction; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6fc0f28a89..aa723c62cd 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1805,20 +1805,6 @@ if (WINDOWS) if (PACKAGE) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2 - COMMAND ${PYTHON_EXECUTABLE} - ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CFG_INTDIR} - DEPENDS - lleventhost - ${EVENT_HOST_SCRIPTS} - ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py - ) - - add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat COMMAND ${PYTHON_EXECUTABLE} ARGS @@ -1847,9 +1833,6 @@ if (WINDOWS) add_custom_target(llpackage ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat ) - # temporarily disable packaging of event_host until hg subrepos get - # sorted out on the parabuild cluster... - #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2) endif (PACKAGE) elseif (DARWIN) @@ -1917,6 +1900,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLPHYSICSEXTENSIONS_LIBRARIES} ll::bugsplat ll::tracy + ll::lualibs ) if( TARGET ll::intel_memops ) @@ -2287,7 +2271,7 @@ if (LL_TESTS) LL_ADD_INTEGRATION_TEST(llluamanager "llluamanager.cpp" - "${test_libs}" + "${test_libs};ll::lualibs" ) LL_ADD_INTEGRATION_TEST(llsechandler_basic diff --git a/indra/newview/llfloaterluadebug.cpp b/indra/newview/llfloaterluadebug.cpp index 44454d7be0..32e9e4f1b7 100644 --- a/indra/newview/llfloaterluadebug.cpp +++ b/indra/newview/llfloaterluadebug.cpp @@ -38,10 +38,6 @@ #include "llluamanager.h" -#if LL_WINDOWS -#pragma comment(lib, "liblua54.a") -#endif - LLFloaterLUADebug::LLFloaterLUADebug(const LLSD &key) : LLFloater(key) diff --git a/indra/newview/llluamanager.cpp b/indra/newview/llluamanager.cpp index 0475122832..2bdf4fd0b0 100644 --- a/indra/newview/llluamanager.cpp +++ b/indra/newview/llluamanager.cpp @@ -64,12 +64,9 @@ extern LLUIListener sUIListener; #include <boost/algorithm/string/replace.hpp> -extern "C" -{ #include "lua/lua.h" #include "lua/lauxlib.h" #include "lua/lualib.h" -} #include <algorithm> #include <cstdlib> // std::rand() @@ -80,10 +77,6 @@ extern "C" #include <string_view> #include <vector> -#if LL_WINDOWS -#pragma comment(lib, "liblua54.a") -#endif - std::string lua_tostdstring(lua_State* L, int index); void lua_pushstdstring(lua_State* L, const std::string& str); LLSD lua_tollsd(lua_State* L, int index); diff --git a/indra/newview/tests/llluamanager_test.cpp b/indra/newview/tests/llluamanager_test.cpp index 6433ff1118..98a2726af7 100644 --- a/indra/newview/tests/llluamanager_test.cpp +++ b/indra/newview/tests/llluamanager_test.cpp @@ -18,6 +18,7 @@ #include <vector> // external library headers // other Linden headers +#include "../llcommon/tests/StringVec.h" #include "../test/lltut.h" #include "llapp.h" #include "lldate.h" @@ -27,7 +28,6 @@ #include "lluri.h" #include "lluuid.h" #include "stringize.h" -#include "../llcommon/tests/StringVec.h" class LLTestApp : public LLApp { |