Changeset View
Changeset View
Standalone View
Standalone View
build/premake/premake5.lua
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | function project_set_build_flags() | ||||
if _OPTIONS["without-miniupnpc"] then | if _OPTIONS["without-miniupnpc"] then | ||||
defines { "CONFIG2_MINIUPNPC=0" } | defines { "CONFIG2_MINIUPNPC=0" } | ||||
end | end | ||||
-- required for the lowlevel library. must be set from all projects that use it, otherwise it assumes it is | -- required for the lowlevel library. must be set from all projects that use it, otherwise it assumes it is | ||||
-- being used as a DLL (which is currently not the case in 0ad) | -- being used as a DLL (which is currently not the case in 0ad) | ||||
defines { "LIB_STATIC_LINK" } | defines { "LIB_STATIC_LINK" } | ||||
-- Enable C++14 standard. | |||||
filter "action:vs*" | |||||
buildoptions { "/std:c++14" } | |||||
filter "action:not vs*" | |||||
buildoptions { "-std=c++14" } | |||||
filter {} | |||||
-- various platform-specific build flags | -- various platform-specific build flags | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
flags { "MultiProcessorCompile" } | flags { "MultiProcessorCompile" } | ||||
-- use native wchar_t type (not typedef to unsigned short) | -- use native wchar_t type (not typedef to unsigned short) | ||||
nativewchar "on" | nativewchar "on" | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | else | ||||
-- while tuning for generic to have good performance on every | -- while tuning for generic to have good performance on every | ||||
-- supported CPU. | -- supported CPU. | ||||
-- Note that all these features are already supported on amd64. | -- Note that all these features are already supported on amd64. | ||||
"-march=pentium3 -mtune=generic" | "-march=pentium3 -mtune=generic" | ||||
} | } | ||||
end | end | ||||
end | end | ||||
buildoptions { | |||||
-- Enable C++11 standard. | |||||
"-std=c++0x" | |||||
} | |||||
if arch == "arm" then | if arch == "arm" then | ||||
-- disable warnings about va_list ABI change and use | -- disable warnings about va_list ABI change and use | ||||
-- compile-time flags for futher configuration. | -- compile-time flags for futher configuration. | ||||
buildoptions { "-Wno-psabi" } | buildoptions { "-Wno-psabi" } | ||||
if _OPTIONS["android"] then | if _OPTIONS["android"] then | ||||
-- Android uses softfp, so we should too. | -- Android uses softfp, so we should too. | ||||
buildoptions { "-mfloat-abi=softfp" } | buildoptions { "-mfloat-abi=softfp" } | ||||
end | end | ||||
▲ Show 20 Lines • Show All 773 Lines • ▼ Show 20 Lines | function setup_atlas_project(project_name, target_type, rel_source_dirs, rel_include_dirs, extern_libs, extra_params) | ||||
end | end | ||||
project_add_contents(source_root, rel_source_dirs, rel_include_dirs, extra_params) | project_add_contents(source_root, rel_source_dirs, rel_include_dirs, extra_params) | ||||
project_add_extern_libs(extern_libs, target_type) | project_add_extern_libs(extern_libs, target_type) | ||||
-- Platform Specifics | -- Platform Specifics | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
-- Link to required libraries | -- Link to required libraries | ||||
links { "winmm", "comctl32", "rpcrt4", "delayimp", "ws2_32" } | links { "winmm", "delayimp" } | ||||
elseif os.istarget("linux") or os.istarget("bsd") then | elseif os.istarget("linux") or os.istarget("bsd") then | ||||
buildoptions { "-rdynamic", "-fPIC" } | buildoptions { "-rdynamic", "-fPIC" } | ||||
linkoptions { "-fPIC", "-rdynamic" } | linkoptions { "-fPIC", "-rdynamic" } | ||||
-- warnings triggered by wxWidgets | -- warnings triggered by wxWidgets | ||||
buildoptions { "-Wno-unused-local-typedefs" } | buildoptions { "-Wno-unused-local-typedefs" } | ||||
▲ Show 20 Lines • Show All 380 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator