0ad/0ad-cs7795.patch

46 lines
1.8 KiB
Diff

Index: source/ps/DllLoader.h
===================================================================
--- source/ps/DllLoader.h (revision 7794)
+++ source/ps/DllLoader.h (revision 7795)
@@ -68,6 +68,11 @@
template <typename T>
void LoadSymbol(const char* name, T& fptr) const;
+ /**
+ * Override the build-time setting of the directory to search for libraries.
+ */
+ static void OverrideLibdir(const CStr& libdir);
+
private:
// Typeless version - the public LoadSymbol hides the slightly ugly
// casting from users.
Index: libraries/cxxtest/include/cxxtest/PsTestWrapper.h
===================================================================
--- libraries/cxxtest/include/cxxtest/PsTestWrapper.h (revision 7794)
+++ libraries/cxxtest/include/cxxtest/PsTestWrapper.h (revision 7795)
@@ -16,6 +16,8 @@
# define PS_TEST_WRAPPER_BASE GuiListener
#endif
+#include "ps/DllLoader.h"
+
namespace CxxTest
{
extern const char *g_PsArgv0;
@@ -112,12 +114,15 @@
}
} else if ( !strcmp( argv[i], "-list" ) ) {
g_PsListSuites = true;
+ } else if ( !strcmp( argv[i], "-libdir" ) ) {
+ DllLoader::OverrideLibdir( argv[++i] );
} else {
fprintf( stderr, "Unrecognized command line option '%s'\n", argv[i] );
fprintf( stderr, "Permitted options:\n" );
fprintf( stderr, " %s -list\n", argv[0] );
fprintf( stderr, " %s -test TestSuiteName\n", argv[0] );
fprintf( stderr, " %s -test TestSuiteName::test_case_name\n", argv[0] );
+ fprintf( stderr, " %s -libdir .\n", argv[0] );
fprintf( stderr, "\n" );
}
}