diff -Nur 0ad-0.0.20-alpha/build/premake/extern_libs4.lua new/build/premake/extern_libs4.lua --- 0ad-0.0.20-alpha/build/premake/extern_libs4.lua 2016-03-12 19:15:04.000000000 +0100 +++ new/build/premake/extern_libs4.lua 2016-08-30 16:09:37.759431993 +0200 @@ -634,7 +634,16 @@ }, tinygettext = { compile_settings = function() - add_third_party_include_paths("tinygettext") + if _OPTIONS["with-system-tinygettext"] then + pkgconfig_cflags("tinygettext") + else + add_third_party_include_paths("tinygettext") + end + end, + link_settings = function() + if _OPTIONS["with-system-tinygettext"] then + pkgconfig_libs("tinygettext") + end end, }, valgrind = { diff -Nur 0ad-0.0.20-alpha/build/premake/premake4.lua new/build/premake/premake4.lua --- 0ad-0.0.20-alpha/build/premake/premake4.lua 2016-03-12 19:15:04.000000000 +0100 +++ new/build/premake/premake4.lua 2016-08-30 16:08:19.490889266 +0200 @@ -15,6 +15,7 @@ newoption { trigger = "without-nvtt", description = "Disable use of NVTT" } newoption { trigger = "without-pch", description = "Disable generation and usage of precompiled headers" } newoption { trigger = "without-tests", description = "Disable generation of test projects" } +newoption { trigger = "with-system-tinygettext", description = "Search standard paths for tinygettext, instead of using bundled copy" } -- OS X specific options newoption { trigger = "macosx-bundle", description = "Enable OSX bundle, the argument is the bundle identifier string (e.g. com.wildfiregames.0ad)" } @@ -599,28 +600,31 @@ end setup_static_lib_project("network", source_dirs, extern_libs, {}) - source_dirs = { - "third_party/tinygettext/src", - } - extern_libs = { - "iconv", - "boost", - } - setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } ) - - -- it's an external library and we don't want to modify its source to fix warnings, so we just disable them to avoid noise in the compile output - if _ACTION == "vs2013" then - buildoptions { - "/wd4127", - "/wd4309", - "/wd4800", - "/wd4100", - "/wd4996", - "/wd4099", - "/wd4503" + if _OPTIONS["with-system-tinygettext"] then + table.insert(extern_libs, "tinygettext") + else + source_dirs = { + "third_party/tinygettext/src", } - end + extern_libs = { + "iconv", + "boost", + } + setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } ) + -- it's an external library and we don't want to modify its source to fix warnings, so we just disable them to avoid noise in the compile output + if _ACTION == "vs2013" then + buildoptions { + "/wd4127", + "/wd4309", + "/wd4800", + "/wd4100", + "/wd4996", + "/wd4099", + "/wd4503" + } + end + end if not _OPTIONS["without-lobby"] then source_dirs = {