Index: build/premake/extern_libs5.lua =================================================================== --- build/premake/extern_libs5.lua +++ build/premake/extern_libs5.lua @@ -218,7 +218,9 @@ }, cxxtest = { compile_settings = function() - sysincludedirs { libraries_source_dir .. "cxxtest-4.4" } + if not _OPTIONS["with-system-cxxtest"] then + sysincludedirs { libraries_source_dir .. "cxxtest-4.4" } + end end, }, enet = { Index: build/premake/premake5.lua =================================================================== --- build/premake/premake5.lua +++ build/premake/premake5.lua @@ -7,6 +7,7 @@ newoption { trigger = "minimal-flags", description = "Only set compiler/linker flags that are really needed. Has no effect on Windows builds" } newoption { trigger = "outpath", description = "Location for generated project files" } newoption { trigger = "with-system-mozjs52", description = "Search standard paths for libmozjs52, instead of using bundled copy" } +newoption { trigger = "with-system-cxxtest", description = "Search standard paths for cxxtest, instead of using bundled copy" } newoption { trigger = "with-system-nvtt", description = "Search standard paths for nvidia-texture-tools library, instead of using bundled copy" } newoption { trigger = "without-audio", description = "Disable use of OpenAL/Ogg/Vorbis APIs" } newoption { trigger = "without-lobby", description = "Disable the use of gloox and the multiplayer lobby" } @@ -1327,7 +1328,11 @@ if os.istarget("windows") then cxxtest.setpath(rootdir.."/build/bin/cxxtestgen.exe") else - cxxtest.setpath(rootdir.."/libraries/source/cxxtest-4.4/bin/cxxtestgen") + if not _OPTIONS["with-system-cxxtest"] then + cxxtest.setpath(rootdir.."/libraries/source/cxxtest-4.4/bin/cxxtestgen") + else + cxxtest.setpath("/usr/bin/cxxtestgen") + end end local runner = "ErrorPrinter"