Fix gamenetworkingsockets abseil C++ version (#3721)

* Fix gamenetworkingsockets abseil C++ version

As suggested by @waruqi in #3710 .

* Set language C++17 in gamenetworkingsockets

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* fix openssl fetch

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* remove arm64 support

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

---------

Co-authored-by: Jérôme Leclercq <lynix680@gmail.com>
Co-authored-by: ruki <waruqi@gmail.com>
pull/3918/head
Robbe Bryssinck 7 months ago committed by GitHub
parent 34812a68d6
commit 6d6da4c6aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      packages/g/gamenetworkingsockets/port/xmake.lua
  2. 2
      packages/g/gamenetworkingsockets/xmake.lua
  3. 9
      packages/o/openssl/fetch.lua

@ -1,15 +1,16 @@
set_languages("gnu11")
option("webrtc", {default = false, showmenu = true})
add_rules("mode.debug", "mode.release")
add_requires("protobuf-cpp", "openssl")
if has_config("webrtc") then
add_requires("abseil")
target("webrtc-lite")
add_rules("c++")
set_kind("static")
add_packages("protobuf-cpp")
if is_plat("windows") then
add_defines("WEBRTC_WIN", "NOMINMAX", "WIN32_LEAN_AND_MEAN", "_WINSOCKAPI_")
add_cxflags("/wd4715", "/wd4005", "/wd4996", "/wd4530")
@ -428,7 +429,8 @@ end
target("gns") -- we need limit path length
set_kind("$(kind)")
add_rules("protobuf.cpp")
set_languages("gnu17", "gnu++17")
add_vectorexts("sse2")
add_packages("protobuf-cpp", "openssl")
set_basename("gamenetworkingsockets")
@ -481,9 +483,10 @@ target("gns") -- we need limit path length
"src/common/crypto_25519_openssl.cpp",
"src/common/opensslwrapper.cpp")
add_files( "src/common/steamnetworkingsockets_messages_certs.proto",
"src/common/steamnetworkingsockets_messages.proto",
"src/common/steamnetworkingsockets_messages_udp.proto", {rules = "protobuf.cpp"})
add_files("src/common/steamnetworkingsockets_messages_certs.proto",
"src/common/steamnetworkingsockets_messages.proto",
"src/common/steamnetworkingsockets_messages_udp.proto")
add_files( "src/common/crypto.cpp",
"src/common/crypto_textencode.cpp",
"src/common/keypair.cpp",

@ -31,7 +31,7 @@ package("gamenetworkingsockets")
end
end)
on_install("windows", "linux", function (package)
on_install("windows|x86", "windows|x64", "linux", function (package)
-- We need copy source codes to the working directory with short path on windows
--
-- Because the target name and source file path of this project are too long,

@ -3,13 +3,16 @@ import("lib.detect.find_library")
-- http://www.slproweb.com/products/Win32OpenSSL.html
function _find_package_on_windows(package, opt)
local bits = package:is_plat("x86") and "32" or "64"
local bits = package:is_arch("x86") and "32" or "64"
local paths = {"$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL %(" .. bits .. "-bit%)_is1;Inno Setup: App Path)",
"$(env PROGRAMFILES)/OpenSSL",
"$(env PROGRAMFILES)/OpenSSL-Win" .. bits,
"C:/OpenSSL",
"C:/OpenSSL-Win" .. bits}
if os.arch() == package:arch() then
table.insert(paths, "$(env PROGRAMFILES)/OpenSSL")
table.insert(paths, "C:/OpenSSL")
end
local result = {links = {}, linkdirs = {}, includedirs = {}}
for _, name in ipairs({"libssl", "libcrypto"}) do
local linkinfo = find_library(name, paths, {suffixes = "lib"})

Loading…
Cancel
Save