Ticket #4192: system-tinygettext.patch

File system-tinygettext.patch, 3.3 KB (added by susnux, 8 years ago)
  • binaries/data/mods/public/gui/credits/texts/programming.json

    diff --git a/binaries/data/mods/public/gui/credits/texts/programming.json b/binaries/data/mods/public/gui/credits/texts/programming.json
    index b99ec28..d45a47a 100644
    a b  
    183183            {"nick": "Stefan"},
    184184            {"nick": "stilz", "name": "Sławomir Zborowski"},
    185185            {"nick": "stwf", "name": "Steven Fuchs"},
     186            {"nick": "Susnux"},
    186187            {"nick": "svott", "name": "Sven Ott"},
    187188            {"nick": "t4nk004"},
    188189            {"nick": "tbm", "name": "Martin Michlmayr"},
  • build/premake/extern_libs4.lua

    diff --git a/build/premake/extern_libs4.lua b/build/premake/extern_libs4.lua
    index 7ec3130..1aad736 100644
    a b extern_lib_defs = {  
    634634    },
    635635    tinygettext = {
    636636        compile_settings = function()
    637             add_third_party_include_paths("tinygettext")
     637            if _OPTIONS["with-system-tinygettext"] then
     638                pkgconfig_cflags("tinygettext")
     639            else
     640                add_third_party_include_paths("tinygettext")
     641            end
     642        end,
     643        link_settings = function()
     644            if _OPTIONS["with-system-tinygettext"] then
     645                pkgconfig_libs("tinygettext")
     646            end
    638647        end,
    639648    },
    640649    valgrind = {
  • build/premake/premake4.lua

    diff --git a/build/premake/premake4.lua b/build/premake/premake4.lua
    index 999759a..5929510 100644
    a b newoption { trigger = "without-miniupnpc", description = "Disable use of miniupn  
    1515newoption { trigger = "without-nvtt", description = "Disable use of NVTT" }
    1616newoption { trigger = "without-pch", description = "Disable generation and usage of precompiled headers" }
    1717newoption { trigger = "without-tests", description = "Disable generation of test projects" }
     18newoption { trigger = "with-system-tinygettext", description = "Search standard paths for tinygettext, instead of using bundled copy" }
    1819
    1920-- OS X specific options
    2021newoption { trigger = "macosx-bundle", description = "Enable OSX bundle, the argument is the bundle identifier string (e.g. com.wildfiregames.0ad)" }
    function setup_all_libs ()  
    599600    end
    600601    setup_static_lib_project("network", source_dirs, extern_libs, {})
    601602
    602     source_dirs = {
    603         "third_party/tinygettext/src",
    604     }
    605     extern_libs = {
    606         "iconv",
    607         "boost",
    608     }
    609     setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } )
    610    
    611     -- 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
    612     if _ACTION == "vs2013" then
    613         buildoptions {
    614             "/wd4127",
    615             "/wd4309",
    616             "/wd4800",
    617             "/wd4100",
    618             "/wd4996",
    619             "/wd4099",
    620             "/wd4503"
     603    if _OPTIONS["with-system-tinygettext"] then
     604        table.insert(extern_libs, "tinygettext")
     605    else
     606        source_dirs = {
     607            "third_party/tinygettext/src",
    621608        }
    622     end
     609        extern_libs = {
     610            "iconv",
     611            "boost",
     612        }
     613        setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } )
    623614
     615        -- 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
     616        if _ACTION == "vs2013" then
     617            buildoptions {
     618                "/wd4127",
     619                "/wd4309",
     620                "/wd4800",
     621                "/wd4100",
     622                "/wd4996",
     623                "/wd4099",
     624                "/wd4503"
     625            }
     626        end
     627    end
    624628
    625629    if not _OPTIONS["without-lobby"] then
    626630        source_dirs = {