mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-08-08 08:35:40 +02:00
new deps premake file
This commit is contained in:
parent
b41153812b
commit
c134b8ac10
2 changed files with 90 additions and 5 deletions
|
@ -93,6 +93,16 @@ newoption {
|
|||
trigger = "ext-ingame_overlay",
|
||||
description = "Extract ingame_overlay",
|
||||
}
|
||||
newoption {
|
||||
category = "extract",
|
||||
trigger = "ext-opus",
|
||||
description = "Extract opus",
|
||||
}
|
||||
newoption {
|
||||
category = "extract",
|
||||
trigger = "ext-portaudio",
|
||||
description = "Extract portaudio",
|
||||
}
|
||||
|
||||
-- build
|
||||
newoption {
|
||||
|
@ -146,7 +156,16 @@ newoption {
|
|||
trigger = "build-ingame_overlay",
|
||||
description = "Build ingame_overlay",
|
||||
}
|
||||
|
||||
newoption {
|
||||
category = "build",
|
||||
trigger = "build-opus",
|
||||
description = "Build opus",
|
||||
}
|
||||
newoption {
|
||||
category = "build",
|
||||
trigger = "build-portaudio",
|
||||
description = "Build portaudio",
|
||||
}
|
||||
|
||||
local function merge_list(src, dest)
|
||||
local src_count = #src
|
||||
|
@ -213,6 +232,7 @@ local cmake_common_defs = {
|
|||
'CMAKE_POSITION_INDEPENDENT_CODE=True',
|
||||
'BUILD_SHARED_LIBS=OFF',
|
||||
'CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded',
|
||||
"CMAKE_CXX_STANDARD=17",
|
||||
}
|
||||
|
||||
|
||||
|
@ -427,6 +447,12 @@ end
|
|||
if _OPTIONS["ext-ingame_overlay"] or _OPTIONS["all-ext"] then
|
||||
table.insert(deps_to_extract, { 'ingame_overlay/ingame_overlay.tar.gz', 'ingame_overlay' })
|
||||
end
|
||||
if _OPTIONS["ext-opus"] or _OPTIONS["all-ext"] then
|
||||
table.insert(deps_to_extract, { 'opus/opus.tar.gz', 'opus' })
|
||||
end
|
||||
if _OPTIONS["ext-portaudio"] or _OPTIONS["all-ext"] then
|
||||
table.insert(deps_to_extract, { 'portaudio/portaudio.tar.gz', 'portaudio' })
|
||||
end
|
||||
|
||||
-- start extraction
|
||||
for _, dep in pairs(deps_to_extract) do
|
||||
|
@ -662,14 +688,15 @@ if _OPTIONS["build-protobuf"] or _OPTIONS["all-build"] then
|
|||
"ABSL_PROPAGATE_CXX_STD=ON",
|
||||
"protobuf_BUILD_PROTOBUF_BINARIES=ON",
|
||||
"protobuf_BUILD_PROTOC_BINARIES=ON",
|
||||
"protobuf_BUILD_LIBPROTOC=OFF",
|
||||
"protobuf_BUILD_LIBUPB=OFF",
|
||||
"protobuf_BUILD_LIBPROTOC=ON",
|
||||
"protobuf_BUILD_LIBUPB=ON",
|
||||
"protobuf_BUILD_TESTS=OFF",
|
||||
"protobuf_BUILD_EXAMPLES=OFF",
|
||||
"protobuf_DISABLE_RTTI=ON",
|
||||
"protobuf_BUILD_CONFORMANCE=OFF",
|
||||
"protobuf_BUILD_SHARED_LIBS=OFF",
|
||||
"protobuf_WITH_ZLIB=ON",
|
||||
"protobuf_FORCE_FETCH_DEPENDENCIES=ON",
|
||||
}
|
||||
if os.target() == 'windows' and string.match(_ACTION, 'gmake.*') then
|
||||
table.insert(proto_common_defs, 'protobuf_MSVC_STATIC_RUNTIME=ON')
|
||||
|
@ -737,3 +764,46 @@ if _OPTIONS["build-ingame_overlay"] or _OPTIONS["all-build"] then
|
|||
cmake_build('ingame_overlay', false, ingame_overlay_common_defs, nil, ingame_overlay_fixes)
|
||||
end
|
||||
end
|
||||
|
||||
if _OPTIONS["build-opus"] or _OPTIONS["all-build"] then
|
||||
local opus_common_defs = {
|
||||
"OPUS_BUILD_SHARED_LIBRARY=OFF",
|
||||
"OPUS_BUILD_TESTING=OFF",
|
||||
"OPUS_BUILD_PROGRAMS=OFF",
|
||||
"OPUS_CUSTOM_MODES=OFF",
|
||||
"OPUS_STATIC_RUNTIME=ON",
|
||||
}
|
||||
|
||||
if _OPTIONS["32-build"] then
|
||||
cmake_build('opus', true, opus_common_defs)
|
||||
end
|
||||
if _OPTIONS["64-build"] then
|
||||
cmake_build('opus', false, opus_common_defs)
|
||||
end
|
||||
end
|
||||
|
||||
if _OPTIONS["build-portaudio"] or _OPTIONS["all-build"] then
|
||||
local portaudio_common_defs = {
|
||||
"PA_BUILD_SHARED_LIBS=OFF",
|
||||
"PA_BUILD_TESTS=OFF",
|
||||
"PA_BUILD_EXAMPLES=OFF",
|
||||
"PA_ENABLE_DEBUG_OUTPUT=OFF",
|
||||
"PA_USE_SKELETON=OFF", -- skeleton idk what that means
|
||||
-- Win dependent stuff
|
||||
"PA_USE_ASIO=OFF",
|
||||
"PA_USE_DS=ON",
|
||||
"PA_USE_WMME=ON",
|
||||
"PA_USE_WASAPI=ON",
|
||||
"PA_USE_WDMKS=ON",
|
||||
"PA_USE_WDMKS_DEVICE_INFO=ON",
|
||||
-- linux specific stuff
|
||||
"PA_ALSA_DYNAMIC=OFF",
|
||||
}
|
||||
|
||||
if _OPTIONS["32-build"] then
|
||||
cmake_build('portaudio', true, portaudio_common_defs)
|
||||
end
|
||||
if _OPTIONS["64-build"] then
|
||||
cmake_build('portaudio', false, portaudio_common_defs)
|
||||
end
|
||||
end
|
19
premake5.lua
19
premake5.lua
|
@ -205,6 +205,8 @@ local x32_deps_include = {
|
|||
path.join(deps_dir, "protobuf/install32/include"),
|
||||
path.join(deps_dir, "zlib/install32/include"),
|
||||
path.join(deps_dir, "mbedtls/install32/include"),
|
||||
path.join(deps_dir, "opus/install32/include"),
|
||||
path.join(deps_dir, "portaudio/install32/include"),
|
||||
}
|
||||
|
||||
local x32_deps_overlay_include = {
|
||||
|
@ -219,6 +221,8 @@ local x64_deps_include = {
|
|||
path.join(deps_dir, "protobuf/install64/include"),
|
||||
path.join(deps_dir, "zlib/install64/include"),
|
||||
path.join(deps_dir, "mbedtls/install64/include"),
|
||||
path.join(deps_dir, "opus/install64/include"),
|
||||
path.join(deps_dir, "portaudio/install64/include"),
|
||||
}
|
||||
|
||||
local x64_deps_overlay_include = {
|
||||
|
@ -279,6 +283,8 @@ local deps_link = {
|
|||
"mbedcrypto" .. static_postfix,
|
||||
"mbedtls" .. static_postfix,
|
||||
"mbedx509" .. static_postfix,
|
||||
"opus" .. static_postfix,
|
||||
"portaudio" .. static_postfix,
|
||||
}
|
||||
-- add protobuf libs
|
||||
table_append(deps_link, {
|
||||
|
@ -335,11 +341,13 @@ table_append(deps_link, {
|
|||
"absl_log_internal_message" .. static_postfix,
|
||||
"absl_log_internal_nullguard" .. static_postfix,
|
||||
"absl_log_internal_proto" .. static_postfix,
|
||||
"absl_log_internal_structured_proto" .. static_postfix,
|
||||
"absl_log_severity" .. static_postfix,
|
||||
"absl_log_sink" .. static_postfix,
|
||||
"absl_low_level_hash" .. static_postfix,
|
||||
"absl_malloc_internal" .. static_postfix,
|
||||
"absl_periodic_sampler" .. static_postfix,
|
||||
"absl_poison" .. static_postfix,
|
||||
"absl_random_distributions" .. static_postfix,
|
||||
"absl_random_internal_distribution_test_util" .. static_postfix,
|
||||
"absl_random_internal_platform" .. static_postfix,
|
||||
|
@ -368,9 +376,12 @@ table_append(deps_link, {
|
|||
"absl_throw_delegate" .. static_postfix,
|
||||
"absl_time" .. static_postfix,
|
||||
"absl_time_zone" .. static_postfix,
|
||||
"absl_tracing_internal" .. static_postfix,
|
||||
"absl_utf8_for_code_point" .. static_postfix,
|
||||
"absl_vlog_config_internal" .. static_postfix,
|
||||
"utf8_range" .. static_postfix,
|
||||
"utf8_validity" .. static_postfix,
|
||||
lib_prefix .."utf8_range" .. static_postfix,
|
||||
lib_prefix .."utf8_validity" .. static_postfix,
|
||||
lib_prefix .."upb" .. static_postfix,
|
||||
})
|
||||
|
||||
local common_link_win = {
|
||||
|
@ -423,6 +434,8 @@ local x32_deps_libdir = {
|
|||
path.join(deps_dir, "protobuf/install32/lib"),
|
||||
path.join(deps_dir, "zlib/install32/lib"),
|
||||
path.join(deps_dir, "mbedtls/install32/lib"),
|
||||
path.join(deps_dir, "opus/install32/lib"),
|
||||
path.join(deps_dir, "portaudio/install32/lib"),
|
||||
}
|
||||
|
||||
local x32_deps_overlay_libdir = {
|
||||
|
@ -438,6 +451,8 @@ local x64_deps_libdir = {
|
|||
path.join(deps_dir, "zlib/install64/lib"),
|
||||
path.join(deps_dir, "mbedtls/install64/lib"),
|
||||
path.join(deps_dir, "ingame_overlay/install64/lib"),
|
||||
path.join(deps_dir, "opus/install64/lib"),
|
||||
path.join(deps_dir, "portaudio/install64/lib"),
|
||||
}
|
||||
|
||||
local x64_deps_overlay_libdir = {
|
||||
|
|
Loading…
Add table
Reference in a new issue