Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/build/premake/premake5.lua
Show First 20 Lines • Show All 530 Lines • ▼ Show 20 Lines | function setup_static_lib_project (project_name, rel_source_dirs, extern_libs, extra_params) | ||||
project_add_x11_dirs() | project_add_x11_dirs() | ||||
if not extra_params["no_default_link"] then | if not extra_params["no_default_link"] then | ||||
table.insert(static_lib_names, project_name) | table.insert(static_lib_names, project_name) | ||||
end | end | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
rtti "off" | rtti "off" | ||||
elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then | |||||
xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } | |||||
end | end | ||||
end | end | ||||
function setup_third_party_static_lib_project (project_name, rel_source_dirs, extern_libs, extra_params) | function setup_third_party_static_lib_project (project_name, rel_source_dirs, extern_libs, extra_params) | ||||
setup_static_lib_project(project_name, rel_source_dirs, extern_libs, extra_params) | setup_static_lib_project(project_name, rel_source_dirs, extern_libs, extra_params) | ||||
includedirs { source_root .. "third_party/" .. project_name .. "/include/" } | includedirs { source_root .. "third_party/" .. project_name .. "/include/" } | ||||
end | end | ||||
function setup_shared_lib_project (project_name, rel_source_dirs, extern_libs, extra_params) | function setup_shared_lib_project (project_name, rel_source_dirs, extern_libs, extra_params) | ||||
local target_type = "SharedLib" | local target_type = "SharedLib" | ||||
project_create(project_name, target_type) | project_create(project_name, target_type) | ||||
project_add_contents(source_root, rel_source_dirs, {}, extra_params) | project_add_contents(source_root, rel_source_dirs, {}, extra_params) | ||||
project_add_extern_libs(extern_libs, target_type) | project_add_extern_libs(extern_libs, target_type) | ||||
project_add_x11_dirs() | project_add_x11_dirs() | ||||
if not extra_params["no_default_link"] then | if not extra_params["no_default_link"] then | ||||
table.insert(static_lib_names, project_name) | table.insert(static_lib_names, project_name) | ||||
end | end | ||||
if os.istarget("windows") then | if os.istarget("windows") then | ||||
rtti "off" | rtti "off" | ||||
links { "delayimp" } | links { "delayimp" } | ||||
elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then | |||||
xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } | |||||
end | end | ||||
end | end | ||||
-- this is where the source tree is chopped up into static libs. | -- this is where the source tree is chopped up into static libs. | ||||
-- can be changed very easily; just copy+paste a new setup_static_lib_project, | -- can be changed very easily; just copy+paste a new setup_static_lib_project, | ||||
-- or remove existing ones. static libs are automagically added to | -- or remove existing ones. static libs are automagically added to | ||||
-- main_exe link step. | -- main_exe link step. | ||||
▲ Show 20 Lines • Show All 458 Lines • ▼ Show 20 Lines | elseif os.istarget("linux") or os.istarget("bsd") then | ||||
filter "Debug" | filter "Debug" | ||||
linkoptions { "-rdynamic" } | linkoptions { "-rdynamic" } | ||||
filter { } | filter { } | ||||
elseif os.istarget("macosx") then | elseif os.istarget("macosx") then | ||||
links { "pthread" } | links { "pthread" } | ||||
links { "ApplicationServices.framework", "Cocoa.framework", "CoreFoundation.framework" } | links { "ApplicationServices.framework", "Cocoa.framework", "CoreFoundation.framework" } | ||||
if _OPTIONS["macosx-version-min"] then | |||||
xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } | |||||
end | |||||
end | end | ||||
end | end | ||||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||||
-- atlas | -- atlas | ||||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||||
▲ Show 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | elseif os.istarget("linux") or os.istarget("bsd") then | ||||
end | end | ||||
-- For debug_resolve_symbol | -- For debug_resolve_symbol | ||||
filter "Debug" | filter "Debug" | ||||
linkoptions { "-rdynamic" } | linkoptions { "-rdynamic" } | ||||
filter { } | filter { } | ||||
includedirs { source_root .. "pch/test/" } | includedirs { source_root .. "pch/test/" } | ||||
elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then | |||||
xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] } | |||||
end | end | ||||
end | end | ||||
-- must come first, so that VC sets it as the default project and therefore | -- must come first, so that VC sets it as the default project and therefore | ||||
-- allows running via F5 without the "where is the EXE" dialog. | -- allows running via F5 without the "where is the EXE" dialog. | ||||
setup_main_exe() | setup_main_exe() | ||||
setup_all_libs() | setup_all_libs() | ||||
Show All 24 Lines |
Wildfire Games · Phabricator