From 1d75b82a5cfbfd13ae34ad5f599380c6a7ae6f69 Mon Sep 17 00:00:00 2001 From: Detanup01 <91248446+Detanup01@users.noreply.github.com> Date: Mon, 20 May 2024 13:07:01 +0200 Subject: [PATCH] merge stuff frrom premake2 branch, Updating stuff to work --- .github/workflows/emu-build-all-linux.yml | 9 +- .github/workflows/emu-build-all-win.yml | 15 +- build_win_premake.bat | 16 +- premake5.lua | 1455 +++++++++++++-------- 4 files changed, 917 insertions(+), 578 deletions(-) diff --git a/.github/workflows/emu-build-all-linux.yml b/.github/workflows/emu-build-all-linux.yml index 0c94144e..1c011efc 100644 --- a/.github/workflows/emu-build-all-linux.yml +++ b/.github/workflows/emu-build-all-linux.yml @@ -33,15 +33,10 @@ jobs: fail-fast: false matrix: ## notice how on linux everything is lowercase, `cd GBE_Build`, then: `make help` - prj: [ 'GenerateInterfaces', 'SteamClient', 'SteamEmu', ] + prj: [ 'regular', 'experimental', 'steamclient_experimental', 'steamnetworkingsockets', 'tool_lobby_connect', 'GenerateInterfaces', 'steamclient_regular_linux', ] arch: [ 'x64', 'x32', ] - cfg: [ 'debug', 'release', 'experimentaldebug', 'experimentalrelease', ] + cfg: [ 'debug', 'release', ] - exclude: - - prj: 'GenerateInterfaces' - cfg: 'experimentaldebug' - - prj: 'GenerateInterfaces' - cfg: 'experimentalrelease' steps: ### clone branch diff --git a/.github/workflows/emu-build-all-win.yml b/.github/workflows/emu-build-all-win.yml index 099656be..95b61402 100644 --- a/.github/workflows/emu-build-all-win.yml +++ b/.github/workflows/emu-build-all-win.yml @@ -31,20 +31,9 @@ jobs: strategy: fail-fast: false matrix: - prj: [ 'GameOverlayRenderer', 'GenerateInterfaces', 'SteamClient', 'SteamEmu', ] + prj: [ 'regular', 'experimental', 'steamclient_experimental', 'steamnetworkingsockets', 'tool_lobby_connect', 'GenerateInterfaces', 'experimental_client_win', 'GameOverlayRenderer', ] arch: [ 'x64', 'Win32', ] - cfg: [ 'Debug', 'Release', 'ExperimentalDebug', 'ExperimentalRelease', ] - - exclude: - - prj: 'GameOverlayRenderer' - cfg: 'Debug' - - prj: 'GameOverlayRenderer' - cfg: 'Release' - - - prj: 'GenerateInterfaces' - cfg: 'ExperimentalDebug' - - prj: 'GenerateInterfaces' - cfg: 'ExperimentalRelease' + cfg: [ 'debug', 'release', ] steps: ### on Windows Git will auto change line ending to CRLF, not preferable diff --git a/build_win_premake.bat b/build_win_premake.bat index 17f3f41e..a1f77b94 100644 --- a/build_win_premake.bat +++ b/build_win_premake.bat @@ -23,14 +23,10 @@ if "%my_vs_path%"=="" ( :: Set configuration and platform here :) :: manual config for all remove later -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=Debug /p:Platform=x64 -v:n -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=Debug /p:Platform=Win32 -v:n -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=Release /p:Platform=x64 -v:n -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=Release /p:Platform=Win32 -v:n -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=ExperimentalDebug /p:Platform=x64 -v:n -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=ExperimentalDebug /p:Platform=Win32 -v:n -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=ExperimentalRelease /p:Platform=x64 -v:n -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=ExperimentalRelease /p:Platform=Win32 -v:n +call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debug /p:Platform=x64 -v:n +call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debug /p:Platform=Win32 -v:n +call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=release /p:Platform=x64 -v:n +call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=release /p:Platform=Win32 -v:n exit /b @@ -43,8 +39,8 @@ endlocal & ( :: -v:n make it so we can actually see what commands it runs -call %my_vs_path% GBE_Build\GBE.sln /p:Configuration=ExperimentalDebug /p:Platform=x64 -v:n -::call %my_vs_path% GBE_Build\GBE.sln +call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debuug /p:Platform=x64 -v:n +::call %my_vs_path% build\project\vs2022\win\GBE.sln set /a _exit=%errorlevel% if %_exit% equ 0 ( echo Please do change_dos_stub and sign it. (or you can move into premake to do it for you) diff --git a/premake5.lua b/premake5.lua index 5ef8039e..3cd89d8b 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1,540 +1,835 @@ --- pre-define stuffs -local default_files = { - "dll/**", - "sdk/**", - "helpers/**" -} - -local predefined_libs = { - "libs/fifo_map/**", - "libs/json/**", - "libs/sha/**", - "libs/simpleini/**", - "libs/stb/**", - "libs/utfcpp/**" -} - -local crash_win = { - "crash_printer/win.cpp", - "crash_printer/crash_printer/win.hpp" -} - -local crash_linux = { - "crash_printer/linux.cpp", - "crash_printer/crash_printer/linux.hpp" -} - -local win_link = { - "Ws2_32.lib", "Iphlpapi.lib", "Wldap32.lib", "Winmm.lib", "Bcrypt.lib", "Dbghelp.lib" -} - -local linux_link = { - "pthread", - "dl", - "ssq:static", - "z:static", -- libz library - "curl:static", - "protobuf-lite:static", - "mbedcrypto:static" -} - -local default_link = { - "ssq.lib", - "libcurl.lib", - "libprotobuf-lite.lib", - "zlibstatic.lib", - "mbedcrypto.lib" -} - -local basic_dir_win = "build/deps/win/" -local basic_dir_linux = "build/deps/linux/" - -local overlay_link_windows = { - "ingame_overlay.lib", - "system.lib", - "mini_detour.lib" -} - -local overlay_link_linux = { - "ingame_overlay:static", - "system:static", -- ingame_overlay dependency - "mini_detour:static" -- ingame_overlay dependency -} - -local default_include = { - "dll", - "sdk", - "libs", - "helpers", - "crash_printer", - "overlay_experimental", - "controller" -} - -local windows_files = { - default_files, - predefined_libs, - crash_win -} +require("premake", ">=5.0.0-beta2") -local linux_files = { - default_files, - predefined_libs, - crash_linux, - "controller/**" -} --- 32 -local x32_libsdir_win = { - basic_dir_win .. "libssq/build32/Release", - basic_dir_win .. "curl/install32/lib", - basic_dir_win .. "protobuf/install32/lib", - basic_dir_win .. "zlib/install32/lib", - basic_dir_win .. "mbedtls/install32/lib", - basic_dir_win .. "ingame_overlay/install32/lib", - basic_dir_win .. "ingame_overlay/deps/System/install32/lib", - basic_dir_win .. "ingame_overlay/deps/mini_detour/install32/lib" -} +-- add "-Wl,--whole-archive -Wl,-Bstatic -lmylib -Wl,-Bdynamic -Wl,--no-whole-archive" +-- via: links { 'mylib:static_whole' } +premake.override(premake.tools.gcc, "getlinks", function(originalFn, cfg, systemonly, nogroups) + -- source: + -- premake.tools.gcc.getlinks(cfg, systemonly, nogroups) + -- https://github.com/premake/premake-core/blob/d842e671c7bc7e09f2eeaafd199fd01e48b87ee7/src/tools/gcc.lua#L568C15-L568C22 -local x32_libsdir_linux = { - basic_dir_linux .. "libssq/build32", - basic_dir_linux .. "curl/install32/lib", - basic_dir_linux .. "protobuf/install32/lib", - basic_dir_linux .. "zlib/install32/lib", - basic_dir_linux .. "mbedtls/install32/lib", - basic_dir_linux .. "ingame_overlay/install32/lib", - basic_dir_linux .. "ingame_overlay/deps/System/install32/lib", - basic_dir_linux .. "ingame_overlay/deps/mini_detour/install32/lib" -} + local result = originalFn(cfg, systemonly, nogroups) + local total_count = #result + local static_whole_syslibs = {"-Wl,--whole-archive -Wl,-Bstatic"} -local x32_include_win = { - basic_dir_win .. "libssq/include", - basic_dir_win .. "curl/install32/include", - basic_dir_win .. "protobuf/install32/include", - basic_dir_win .. "zlib/install32/include", - basic_dir_win .. "mbedtls/install32/include", - basic_dir_win .. "ingame_overlay/install32/include", - basic_dir_win .. "ingame_overlay/deps/System/install32/include", - basic_dir_win .. "ingame_overlay/deps/mini_detour/install32/include" -} - -local x32_include_linux = { - basic_dir_linux .. "libssq/include", - basic_dir_linux .. "curl/install32/include", - basic_dir_linux .. "protobuf/install32/include", - basic_dir_linux .. "zlib/install32/include", - basic_dir_linux .. "mbedtls/install32/include", - basic_dir_linux .. "ingame_overlay/install32/include", - basic_dir_linux .. "ingame_overlay/deps/System/install32/include", - basic_dir_linux .. "ingame_overlay/deps/mini_detour/install32/include" -} - --- 32 end --- 64 -local x64_libsdir_win = { - basic_dir_win .. "libssq/build64/Release", - basic_dir_win .. "curl/install64/lib", - basic_dir_win .. "protobuf/install64/lib", - basic_dir_win .. "zlib/install64/lib", - basic_dir_win .. "mbedtls/install64/lib", - basic_dir_win .. "ingame_overlay/install64/lib", - basic_dir_win .. "ingame_overlay/deps/System/install64/lib", - basic_dir_win .. "ingame_overlay/deps/mini_detour/install64/lib" -} - -local x64_libsdir_linux = { - basic_dir_linux .. "libssq/build64", - basic_dir_linux .. "curl/install64/lib", - basic_dir_linux .. "protobuf/install64/lib", - basic_dir_linux .. "zlib/install64/lib", - basic_dir_linux .. "mbedtls/install64/lib", - basic_dir_linux .. "ingame_overlay/install64/lib", - basic_dir_linux .. "ingame_overlay/deps/System/install64/lib", - basic_dir_linux .. "ingame_overlay/deps/mini_detour/install64/lib" -} - -local x64_include_win = { - basic_dir_win .. "libssq/include", - basic_dir_win .. "curl/install64/include", - basic_dir_win .. "protobuf/install64/include", - basic_dir_win .. "zlib/install64/include", - basic_dir_win .. "mbedtls/install64/include", - basic_dir_win .. "ingame_overlay/install64/include", - basic_dir_win .. "ingame_overlay/deps/System/install64/include", - basic_dir_win .. "ingame_overlay/deps/mini_detour/install64/include" -} - -local x64_include_linux = { - basic_dir_linux .. "libssq/include", - basic_dir_linux .. "curl/install64/include", - basic_dir_linux .. "protobuf/install64/include", - basic_dir_linux .. "zlib/install64/include", - basic_dir_linux .. "mbedtls/install64/include", - basic_dir_linux .. "ingame_overlay/install64/include", - basic_dir_linux .. "ingame_overlay/deps/System/install64/include", - basic_dir_linux .. "ingame_overlay/deps/mini_detour/install64/include" -} - --- 64 end - --- END of predefines - - -if _ACTION == "generateproto" then - print("Generating from .proto file!") - if os.target() == "windows" then - os.mkdir("dll/proto_gen/win") - os.execute('call ' .. _MAIN_SCRIPT_DIR .. '/' .. basic_dir_win ..'protobuf/install64/bin/protoc.exe dll/net.proto -I./dll/ --cpp_out=dll/proto_gen/win') + local endswith = function(s, ptrn) + return ptrn == string.sub(s, -string.len(ptrn)) end - if os.target() == "linux" then - os.mkdir("dll/proto_gen/linux") - os.chmod(_MAIN_SCRIPT_DIR .. '/' .. basic_dir_linux ..'protobuf/install64/bin/protoc', "777") - os.execute(_MAIN_SCRIPT_DIR .. '/' .. basic_dir_linux ..'protobuf/install64/bin/protoc dll/net.proto -I./dll/ --cpp_out=dll/proto_gen/linux') + + local idx_to_remove = {} + for idx, name in ipairs(result) do + if endswith(name, ":static_whole") then + name = string.sub(name, 0, -14) + table.insert(static_whole_syslibs, name) -- it already includes '-l' + table.insert(idx_to_remove, idx) + end end - print("Generation success!") + + -- remove from the end to avoid trouble with table indexes shifting + for iii = #idx_to_remove, 1, -1 do + table.remove(result, idx_to_remove[iii]) + end + + local move = function(a1, a2) + local t = #a2 + for i = 1, #a1 do a2[t + i] = a1[i] end + end + + if #static_whole_syslibs > 1 then + table.insert(static_whole_syslibs, "-Wl,-Bdynamic -Wl,--no-whole-archive") + move(static_whole_syslibs, result) + end + + return result +end) + + +-- pre-define stuff + +local os_iden = '' -- identifier +if os.target() == "windows" then + os_iden = 'win' + deps_folder = "build/deps/win" +elseif os.target() == "linux" then + os_iden = 'linux' + deps_folder = "build/deps/linux" end +local deps_dir = 'build/deps/' .. os_iden .. '/' + +newaction { + trigger = "genproto", + description = "Generate .cpp/.h files from .proto file", + + onStart = function () + local deps_install_prefix = '' + if os.is64bit() then + deps_install_prefix = 'install64' + else + deps_install_prefix = 'install32' + end + local protoc_exe = os.realpath(deps_dir .. 'protobuf/' .. deps_install_prefix .. '/bin/protoc') + local out_dir = 'dll/proto_gen/' .. os_iden + + if os.host() == "windows" then + protoc_exe = protoc_exe .. '.exe' + end + + if not os.isfile(protoc_exe) then + error("Error: protoc not found!") + return + end + + print("Generating from .proto file!") + local ok_mk, err_mk = os.mkdir(out_dir) + if not ok_mk then + error("Error: " .. err_mk) + return + end + + if os.host() == "linux" then + local ok_chmod, err_chmod = os.chmod(protoc_exe, "777") + if not ok_chmod then + error("Error: " .. err_chmod) + return + end + end + + local ok_cmd = os.execute(protoc_exe .. ' dll/net.proto -I./dll/ --cpp_out=' .. out_dir) + if ok_cmd then + print("Success!") + else + error("protoc error") + end + end +} + newoption { trigger = "emubuild", description = "Set the EMU_BUILD_STRING", - default = "manual" + default = os.date("%Y_%m_%d-%H_%M_%S") } --- GBE Workspace -workspace "GBE" - configurations { "Debug", "Release", "ExperimentalDebug", "ExperimentalRelease" } - platforms { "x64", "x32" } - location "GBE_Build" --- Project SteamEmu -project "SteamEmu" - cppdialect("c++17") - kind "SharedLib" - language "C++" - targetdir "bin/SteamEmu/%{cfg.buildcfg}_%{cfg.platform}" - location "GBE_Build/SteamEmu" - staticruntime "on" - optimize "On" +-- paths to custom tools +--------- +local dos_stub_exe_32 = os.realpath('resources/win/file_dos_stub/file_dos_stub_32.exe') +local dos_stub_exe_64 = os.realpath('resources/win/file_dos_stub/file_dos_stub_64.exe') +local signer_tool = os.realpath('third-party/build/win/cert/sign_helper.bat') + + +-- common defines +--------- +local common_emu_defines = { -- added to all filters, later defines will be appended + "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "CONTROLLER_SUPPORT", "EMU_BUILD_STRING=" .. _OPTIONS["emubuild"], +} + +-- include dirs +--------- +local common_include = { + 'dll', + 'dll/proto_gen/' .. os_iden, + 'libs', + 'libs/utfcpp', + 'helpers', + 'crash_printer', + 'sdk', + 'controller', + "overlay_experimental", +} + +local x32_deps_include = { + deps_dir .. "libssq/include", + deps_dir .. "curl/install32/include", + deps_dir .. "protobuf/install32/include", + deps_dir .. "zlib/install32/include", + deps_dir .. "mbedtls/install32/include", +} + +local x32_deps_overlay_include = { + deps_dir .. "ingame_overlay/install32/include", + deps_dir .. "ingame_overlay/deps/System/install32/include", + deps_dir .. "ingame_overlay/deps/mini_detour/install32/include", +} + +local x64_deps_include = { + deps_dir .. "libssq/include", + deps_dir .. "curl/install64/include", + deps_dir .. "protobuf/install64/include", + deps_dir .. "zlib/install64/include", + deps_dir .. "mbedtls/install64/include", +} + +local x64_deps_overlay_include = { + deps_dir .. "ingame_overlay/install64/include", + deps_dir .. "ingame_overlay/deps/System/install64/include", + deps_dir .. "ingame_overlay/deps/mini_detour/install64/include", +} + + +-- source & header files +--------- +local common_files = { + -- dll/ + "dll/*.cpp", "dll/*.c", + "dll/*.hpp", "dll/*.h", + -- dll/proto_gen/ + 'dll/proto_gen/' .. os_iden .. '/*.cc', 'dll/proto_gen/' .. os_iden .. '/*.h', + -- controller + "controller/gamepad.c", "controller/controller/gamepad.h", + -- crash_printer/ + 'crash_printer/' .. os_iden .. '.cpp', 'crash_printer/crash_printer/' .. os_iden .. '.hpp', + -- helpers/ + "helpers/common_helpers.cpp", "helpers/common_helpers/common_helpers.hpp", +} + + +-- libs to link +--------- +local common_link_win = { + -- os specific + "Ws2_32", "Iphlpapi", "Wldap32", "Winmm", "Bcrypt", "Dbghelp", + -- deps + "ssq", + "zlibstatic", + "libcurl", + "libprotobuf-lite", + "mbedcrypto", +} + +local common_link_linux = { + -- os specific + "pthread", "dl", + -- deps + "ssq:static_whole", + "z:static_whole", -- libz library + "curl:static_whole", + "protobuf-lite:static_whole", + "mbedcrypto:static_whole", +} + +local overlay_link_win = { + "ingame_overlay.lib", + "system.lib", -- ingame_overlay dependency + "mini_detour.lib", -- ingame_overlay dependency +} + +local overlay_link_linux = { + "ingame_overlay:static_whole", + "system:static_whole", -- ingame_overlay dependency + "mini_detour:static_whole", -- ingame_overlay dependency +} + + +-- dirs to custom libs +--------- +local x32_ssq_libdir = deps_dir .. "libssq/build32" +local x64_ssq_libdir = deps_dir .. "libssq/build64" +if os.target() == "windows" then + x32_ssq_libdir = x32_ssq_libdir .. "/Release" + x64_ssq_libdir = x64_ssq_libdir .. "/Release" +end + +local x32_deps_libdir = { + x32_ssq_libdir, + deps_dir .. "curl/install32/lib", + deps_dir .. "protobuf/install32/lib", + deps_dir .. "zlib/install32/lib", + deps_dir .. "mbedtls/install32/lib", +} + +local x32_deps_overlay_libdir = { + deps_dir .. "ingame_overlay/install32/lib", + deps_dir .. "ingame_overlay/deps/System/install32/lib", + deps_dir .. "ingame_overlay/deps/mini_detour/install32/lib", +} + +local x64_deps_libdir = { + x64_ssq_libdir, + deps_dir .. "curl/install64/lib", + deps_dir .. "protobuf/install64/lib", + deps_dir .. "zlib/install64/lib", + deps_dir .. "mbedtls/install64/lib", + deps_dir .. "ingame_overlay/install64/lib", +} + +local x64_deps_overlay_libdir = { + deps_dir .. "ingame_overlay/install64/lib", + deps_dir .. "ingame_overlay/deps/System/install64/lib", + deps_dir .. "ingame_overlay/deps/mini_detour/install64/lib" +} + + + +-- tokenization +-- https://premake.github.io/docs/Tokens/ +-- this means expand the global var 'abc' --> %{abc} +-- this means expand the global var 'abc' and resolve its full path --> %{!abc} +-- this means expand the global var 'abc' as a filepath agnostic to the shell (bash/cmd) --> %[%{abc}] + +-- string concat and functions calls +-- https://premake.github.io/docs/Your-First-Script#functions-and-arguments +-- "asd" .. "zxc" --> "asdzxc" +-- when doing string concat, call premake functions/actions with regular brackets +-- this will work: targetdir("build/" .. os_iden) +-- this will fail: targetdir "build/" .. os_iden +-- both are function calls actually, ex: filter({ 'a', 'b' }) is similar to filter { 'a', 'b' } + +-- stuff defined globally will affect all workspaces & projects +-- https://premake.github.io/docs/Scopes-and-Inheritance/ + +configurations { "debug", "release", } +platforms { "x64", "x32", } +language("C++") + +cppdialect("C++17") +cdialect("C17") +filter { "system:linux", "action:gmake*" , } + cdialect("gnu17") -- gamepad.c relies on some linux-specific functions like strdup() and MAX_PATH +filter {} -- reset the filter and remove all active keywords + +characterset("Unicode") +staticruntime "on" -- /MT or /MTd +runtime "Release" -- ensure we never link with /MTd, otherwise deps linking will fail +flags { + "NoPCH", -- no precompiled header on Windows +} +targetprefix ("") -- prevent adding the prefix libxxx on linux + + +-- arch +--------- +filter { "platforms:x32", } + architecture "x86" +filter { "platforms:x64", } + architecture "x86_64" +filter {} -- reset the filter and remove all active keywords + + +-- debug/optimization flags +--------- +filter { "configurations:*debug", } + symbols "On" + optimize "Off" +filter { "configurations:*release", } symbols "Off" + optimize "On" +filter {} -- reset the filter and remove all active keywords - -- SET ARCH - filter "platforms:x32" + +--- common compiler/linker options +--------- +-- Windows common compiler/linker options +filter { "system:windows", } + buildoptions { + "/permissive-", "/MP", "/DYNAMICBASE", + "/utf-8", "/Zc:char8_t-", "/EHsc", "/GL-" + } + linkoptions { + "/NOLOGO", "/emittoolversioninfo:no" + } + +-- Linux common compiler/linker options +filter { "system:linux", } + buildoptions { + "-fvisibility=hidden", "-fexceptions", "-fno-jump-tables" , "-Wno-switch" + } + linkoptions { + "-Wl,--exclude-libs,ALL" + } +-- this is made separate because GCC complains but not CLANG +filter { "action:gmake*" , "files:*.cpp or *.cc or *.hpp", } + buildoptions { + "-fno-char8_t", -- GCC gives a warning when a .c file is compiled with this + } +filter {} -- reset the filter and remove all active keywords + + +-- defines +--------- +-- release mode defines +filter { "configurations:*release" } + defines { + "NDEBUG", "EMU_RELEASE_BUILD" + } +-- debug mode defines +filter { "configurations:*debug" } + defines { + "DEBUG", + } + +-- Windows defines +filter { "system:windows", } + defines { + "_CRT_SECURE_NO_WARNINGS", + } +-- Linux defines +filter { "system:linux" } + defines { + "GNUC", + } +filter {} -- reset the filter and remove all active keywords + + +-- post build change DOS stub + sign +--------- +-- change dos stub +filter { "system:windows", "platforms:x32", } + postbuildcommands { + '"' .. dos_stub_exe_32 .. '" %[%{!cfg.buildtarget.abspath}]', + } +filter { "system:windows", "platforms:x64", } + postbuildcommands { + '"' .. dos_stub_exe_64 .. '" %[%{!cfg.buildtarget.abspath}]', + } +-- sign +filter { "system:windows", } + postbuildcommands { + '"' .. signer_tool .. '" %[%{!cfg.buildtarget.abspath}]', + } +filter {} -- reset the filter and remove all active keywords + + + +workspace "gbe" + location("build/project/%{_ACTION}/" .. os_iden) + + +-- Project regular +--------- +project "regular" + kind "SharedLib" + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/%{cfg.platform}") + + + -- name + --------- + filter { "system:windows", "platforms:x32", } targetname "steam_api" - architecture "x86" - - filter "platforms:x64" + filter { "system:windows", "platforms:x64", } targetname "steam_api64" - architecture "x86_64" + filter { "system:linux", } + targetname "libsteam_api" - -- BASIC FOR WINDOWS - filter "options:os=windows" - buildoptions { - "/permissive-", "/MP", "/DYNAMICBASE", - "/utf-8", "/Zc:char8_t-", "/EHsc", "/GL-" - } - linkoptions { - "/NOLOGO", "/emittoolversioninfo:no" + + -- defines + --------- + filter {} -- reset the filter and remove all active keywords + defines { -- added to all filters, later defines will be appended + common_emu_defines, + } + + -- include dir + --------- + -- common include dir + filter {} -- reset the filter and remove all active keywords + includedirs { + common_include, + } + + -- x32 include dir + filter { "platforms:x32", } + includedirs { + x32_deps_include, } - filter { "options:os=windows", "configurations:Release" } - defines { - "NDEBUG", "EMU_RELEASE_BUILD", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - - filter { "options:os=windows", "configurations:Debug" } - defines { - "DEBUG", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - - -- WIN 32 DEFAULTS - filter { "platforms:x32", "options:os=windows" } - files { - windows_files, - "resources/win/api/32/resources.rc" - } - links { - win_link, - default_link, - overlay_link_windows - } - - libdirs { - x32_libsdir_win - } - - includedirs { - default_include, - "dll/proto_gen/win", - x32_include_win - } - - -- WIN 64 DEFAULTS - filter { "platforms:x64", "options:os=windows" } - files { - windows_files, - "resources/win/api/64/resources.rc" - } - links { - win_link, - default_link, - overlay_link_windows - } - libdirs { - x64_libsdir_win - } - - includedirs { - default_include, - "dll/proto_gen/win", - x64_include_win - } - - -- BASIC FOR LINUX - filter "options:os=linux" - files { - linux_files + -- x64 include dir + filter { "platforms:x64", } + includedirs { + x64_deps_include, } + + + -- common source & header files + --------- + filter {} -- reset the filter and remove all active keywords + files { -- added to all filters, later defines will be appended + common_files, + } + -- Windows common source files + filter { "system:windows", } removefiles { - "libs/simpleini/**", - "helpers/pe_**" + "dll/wrap.cpp" } - buildoptions { - "-fvisibility=hidden", "-fexceptions", "-fno-jump-tables", "-fno-char8_t" , "-Wundefined-internal", "-Wno-switch" + -- Windows x32 common source files + filter { "system:windows", "platforms:x32", } + files { + "resources/win/api/32/resources.rc" + } + -- Windows x64 common source files + filter { "system:windows", "platforms:x64", } + files { + "resources/win/api/64/resources.rc" } - linkoptions { - "-Wl,--exclude-libs,ALL" - } + -- libs to link + --------- + -- Windows libs to link + filter { "system:windows", } links { - linux_link, - overlay_link_linux + common_link_win, } - filter { "options:os=linux", "configurations:Release" } - defines { - "NDEBUG", "EMU_RELEASE_BUILD", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "GNUC", "CONTROLLER_SUPPORT", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - - filter { "options:os=linux", "configurations:Debug" } - defines { - "DEBUG", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "GNUC", "CONTROLLER_SUPPORT", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - - -- linux 32 DEFAULTS - filter { "platforms:x32", "options:os=linux" } - includedirs { - default_include, - "dll/proto_gen/linux", - x32_include_linux - } - - libdirs { - x32_libsdir_linux - } - - -- linux 64 DEFAULTS - filter { "platforms:x64", "options:os=linux" } - includedirs { - default_include, - "dll/proto_gen/linux", - x64_include_linux - } - libdirs { - x64_libsdir_linux - } - - -- ExperimentalDebug WINDOWS - filter { "ExperimentalDebug", "options:os=windows" } - files { - default_files, - "libs/**", - crash_win, - "controller/**", - "overlay_experimental/**", - "resources/win/api/32/resources.rc" - } - removefiles { "libs/detours/uimports.cc" } - defines { - "EMU_EXPERIMENTAL_BUILD", "CONTROLLER_SUPPORT", "EMU_OVERLAY", "ImTextureID=ImU64", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", - "DEBUG", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - -- ExperimentalRelease WINDOWS - filter { "ExperimentalRelease", "options:os=windows" } - files { - default_files, - "libs/**", - crash_win, - "controller/**", - "overlay_experimental/**", - "resources/win/api/32/resources.rc" - } - removefiles { "libs/detours/uimports.cc" } - defines { - "EMU_EXPERIMENTAL_BUILD" , "CONTROLLER_SUPPORT", "EMU_OVERLAY", "ImTextureID=ImU64", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", - "NDEBUG", "EMU_RELEASE_BUILD", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - -- ExperimentalDebug LINUX - filter { "ExperimentalDebug", "options:os=linux" } - files { - linux_files, - "overlay_experimental/**" + -- Linux libs to link + filter { "system:linux", } + links { + common_link_linux, } - removefiles { - "libs/simpleini/**", - "helpers/pe_**" + + -- libs search dir + --------- + -- x32 libs search dir + filter { "platforms:x32", } + libdirs { + x32_deps_libdir, } - defines { - "CONTROLLER_SUPPORT", "EMU_OVERLAY", "ImTextureID=ImU64", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", - "GNUC", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - -- ExperimentalRelease LINUX - filter { "ExperimentalRelease", "options:os=linux" } - files { - linux_files, - "overlay_experimental/**" + -- x64 libs search dir + filter { "platforms:x64", } + libdirs { + x64_deps_libdir, } - removefiles { - "libs/simpleini/**", - "helpers/pe_**" - } - defines { - "CONTROLLER_SUPPORT", "EMU_OVERLAY", "ImTextureID=ImU64", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", - "NDEBUG", "EMU_RELEASE_BUILD", "GNUC", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } --- Project SteamEmu END --- Project SteamClient -project "SteamClient" - cppdialect("c++17") +-- Project experimental +--------- +project "experimental" kind "SharedLib" - language "C++" - targetdir "bin/SteamClient/%{cfg.buildcfg}_%{cfg.platform}" - location "GBE_Build/SteamClient" - staticruntime "on" + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/experimental/%{cfg.platform}") - optimize "On" - symbols "Off" - -- SET ARCH - filter "platforms:x32" - targetname "steamclient" - architecture "x86" + -- name + --------- + filter { "system:windows", "platforms:x32", } + targetname "steam_api" + filter { "system:windows", "platforms:x64", } + targetname "steam_api64" + filter { "system:linux", } + targetname "libsteam_api" - filter "platforms:x64" - targetname "steamclient64" - architecture "x86_64" - -- BASIC FOR WINDOWS - filter "options:os=windows" - buildoptions { - "/permissive-", "/MP", "/DYNAMICBASE", - "/utf-8", "/Zc:char8_t-", "/EHsc", "/GL-" - } - linkoptions { - "/NOLOGO", "/emittoolversioninfo:no" + -- defines + --------- + filter {} -- reset the filter and remove all active keywords + defines { -- added to all filters, later defines will be appended + common_emu_defines, + "EMU_OVERLAY", "ImTextureID=ImU64", + } + -- Windows defines + filter { "system:windows" } + defines { + "EMU_EXPERIMENTAL_BUILD", } - filter { "options:os=windows", "configurations:Release" } - defines { - "NDEBUG", "EMU_RELEASE_BUILD", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"], "STEAMCLIENT_DLL", "EMU_EXPERIMENTAL_BUILD" - } - filter { "options:os=windows", "configurations:Debug" } - defines { - "DEBUG", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"], "STEAMCLIENT_DLL", "EMU_EXPERIMENTAL_BUILD" - } + -- include dir + --------- + -- common include dir + filter {} -- reset the filter and remove all active keywords + includedirs { + common_include, + } - -- Win32 stuff - filter { "platforms:x32", "options:os=windows" } + -- x32 include dir + filter { "platforms:x32", } + includedirs { + x32_deps_include, + x32_deps_overlay_include, + } + + -- x64 include dir + filter { "platforms:x64", } + includedirs { + x64_deps_include, + x64_deps_overlay_include, + } + + + -- common source & header files + --------- + filter {} -- reset the filter and remove all active keywords + files { -- added to all filters, later defines will be appended + common_files, + "overlay_experimental/**.cpp", "overlay_experimental/**.hpp", + "overlay_experimental/**.c", "overlay_experimental/**.h", + } + -- Windows common source files + filter { "system:windows", } + files { + "libs/detours/**.cpp", "libs/detours/**.hpp", + "libs/detours/**.c", "libs/detours/**.h", + } + removefiles { + "dll/wrap.cpp" + } + -- Windows x32 common source files + filter { "system:windows", "platforms:x32", } + files { + "resources/win/api/32/resources.rc" + } + -- Windows x64 common source files + filter { "system:windows", "platforms:x64", } + files { + "resources/win/api/64/resources.rc" + } + + + -- libs to link + --------- + -- Windows libs to link + filter { "system:windows", } + links { + common_link_win, + overlay_link_win, + } + + -- Linux libs to link + filter { "system:linux", } + links { + common_link_linux, + overlay_link_linux, + } + + + -- libs search dir + --------- + -- x32 libs search dir + filter { "platforms:x32", } + libdirs { + x32_deps_libdir, + x32_deps_overlay_libdir, + } + -- x64 libs search dir + filter { "platforms:x64", } + libdirs { + x64_deps_libdir, + x64_deps_overlay_libdir, + } + + + +-- Project steamclient_experimental +--------- +project "steamclient_experimental" + kind "SharedLib" + location "%{wks.location}/%{prj.name}" + + -- targetdir + --------- + filter { "system:windows", } + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/steamclient_experimental/%{cfg.platform}") + filter { "system:linux", } + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/experimental/%{cfg.platform}") + + + -- name + --------- + filter { "system:windows", "platforms:x32", } + targetname "steamclient" + filter { "system:windows", "platforms:x64", } + targetname "steamclient64" + filter { "system:linux", } + targetname "steamclient" + + + -- defines + --------- + filter {} -- reset the filter and remove all active keywords + defines { -- added to all filters, later defines will be appended + common_emu_defines, + "STEAMCLIENT_DLL", "EMU_OVERLAY", "ImTextureID=ImU64", + } + + -- Windows defines + filter { "system:windows" } + defines { + "EMU_EXPERIMENTAL_BUILD", + } + + + -- include dir + --------- + -- common include dir + filter {} -- reset the filter and remove all active keywords + includedirs { + common_include, + } + + -- x32 include dir + filter { "platforms:x32", } + includedirs { + x32_deps_include, + x32_deps_overlay_include, + } + + -- x64 include dir + filter { "platforms:x64", } + includedirs { + x64_deps_include, + x64_deps_overlay_include, + } + + + -- common source & header files + --------- + filter {} -- reset the filter and remove all active keywords + files { -- added to all filters, later defines will be appended + common_files, + "overlay_experimental/**.cpp", "overlay_experimental/**.hpp", + "overlay_experimental/**.c", "overlay_experimental/**.h", + } + -- Windows common source files + filter { "system:windows", } + files { + "libs/detours/**.cpp", "libs/detours/**.hpp", + "libs/detours/**.c", "libs/detours/**.h", + } + removefiles { + "dll/wrap.cpp" + } + -- Windows x32 common source files + filter { "system:windows", "platforms:x32", } files { - "steamclient/**", "resources/win/client/32/resources.rc" } - - filter { "Experimental**", "options:os=windows", "platforms:x32" } - files { - windows_files, - "controller/**", - "overlay_experimental/**", - "resources/win/client/32/resources.rc" - } - links { - win_link, - default_link, - overlay_link_windows - } - libdirs { - x32_libsdir_win - } - includedirs { - default_include, - "dll/proto_gen/win", - x32_include_win - } - removefiles { "steamclient/**" } - removefiles { "libs/detours/uimports.cc" } - - -- Win64 stuff - filter { "platforms:x64", "options:os=windows" } + -- Windows x64 common source files + filter { "system:windows", "platforms:x64", } files { - "steamclient/**", "resources/win/client/64/resources.rc" } - - filter { "Experimental**", "options:os=windows", "platforms:x64" } - files { - windows_files, - "controller/**", - "overlay_experimental/**", - "resources/win/client/64/resources.rc" - } - links { - win_link, - default_link, - overlay_link_windows - } - libdirs { - x64_libsdir_win - } - includedirs { - default_include, - "dll/proto_gen/win", - x64_include_win - } - removefiles { "steamclient/**" } - removefiles { "libs/detours/uimports.cc" } - -- ExperimentalDebug WINDOWS - filter { "ExperimentalDebug", "options:os=windows" } - defines { - "DEBUG", "UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"], "STEAMCLIENT_DLL", "EMU_EXPERIMENTAL_BUILD", - "ImTextureID=ImU64", "EMU_OVERLAY", "CONTROLLER_SUPPORT" + + -- libs to link + --------- + -- Windows libs to link + filter { "system:windows", } + links { + common_link_win, + overlay_link_win, } - -- ExperimentalRelease WINDOWS - filter { "ExperimentalRelease", "options:os=windows" } - defines { - "NDEBUG", "EMU_RELEASE_BUILD","UTF_CPP_CPLUSPLUS=201703L", "CURL_STATICLIB", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"], "STEAMCLIENT_DLL", "EMU_EXPERIMENTAL_BUILD", - "ImTextureID=ImU64", "EMU_OVERLAY", "CONTROLLER_SUPPORT" + -- Linux libs to link + filter { "system:linux", } + links { + common_link_linux, + overlay_link_linux, + } + + + -- libs search dir + --------- + -- x32 libs search dir + filter { "platforms:x32", } + libdirs { + x32_deps_libdir, + x32_deps_overlay_libdir, + } + -- x64 libs search dir + filter { "platforms:x64", } + libdirs { + x64_deps_libdir, + x64_deps_overlay_libdir, + } + + +-- Project tool_lobby_connect +--------- +project "tool_lobby_connect" + kind "ConsoleApp" + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/tools/lobby_connect") + targetname "lobby_connect_%{cfg.platform}" + + + -- defines + --------- + filter {} -- reset the filter and remove all active keywords + defines { -- added to all filters, later defines will be appended + common_emu_defines, + "NO_DISK_WRITES", "LOBBY_CONNECT", + } + + + -- include dir + --------- + -- common include dir + filter {} -- reset the filter and remove all active keywords + includedirs { + common_include, + } + + -- x32 include dir + filter { "platforms:x32", } + includedirs { + x32_deps_include, + } + + -- x64 include dir + filter { "platforms:x64", } + includedirs { + x64_deps_include, + } + + + -- common source & header files + --------- + filter {} -- reset the filter and remove all active keywords + files { -- added to all filters, later defines will be appended + common_files, + 'tools/lobby_connect/lobby_connect.cpp' + } + -- Windows x32 common source files + filter { "system:windows", "platforms:x32", } + files { + "resources/win/launcher/32/resources.rc" + } + -- Windows x64 common source files + filter { "system:windows", "platforms:x64", } + files { + "resources/win/launcher/64/resources.rc" + } + + + -- libs to link + --------- + -- Windows libs to link + filter { "system:windows", } + links { + common_link_win, + 'Comdlg32.lib', + } + + -- Linux libs to link + filter { "system:linux", } + links { + common_link_linux, + } + + + -- libs search dir + --------- + -- x32 libs search dir + filter { "platforms:x32", } + libdirs { + x32_deps_libdir, + } + -- x64 libs search dir + filter { "platforms:x64", } + libdirs { + x64_deps_libdir, } - -- linux soon --- Project SteamClient END -- Project steamnetworkingsockets START project "steamnetworkingsockets" - cppdialect("c++17") kind "SharedLib" - language "C++" - targetdir "bin/steamnetworkingsockets/%{cfg.buildcfg}_%{cfg.platform}" - location "GBE_Build/steamnetworkingsockets" + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/steamnetworkingsockets/%{cfg.platform}") targetname "steamnetworkingsockets" - optimize "On" - symbols "Off" files { "networking_sockets_lib/**" @@ -545,65 +840,14 @@ project "steamnetworkingsockets" "sdk" } - filter "options:os=windows" - buildoptions { - "/permissive-", "/MP", "/DYNAMICBASE", - "/utf-8", "/Zc:char8_t-", "/EHsc", "/GL-" - } - linkoptions { - "/NOLOGO", "/emittoolversioninfo:no" - } - filter { "options:os=windows", "configurations:**Release" } - defines { - "NDEBUG", "EMU_RELEASE_BUILD", "UTF_CPP_CPLUSPLUS=201703L", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - - filter { "options:os=windows", "configurations:**Debug" } - defines { - "DEBUG", "UTF_CPP_CPLUSPLUS=201703L", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - - filter { "platforms:x64", "options:os=windows"} - files { - "networking_sockets_lib/**", - "resources/win/api/64/resources.rc" - } - filter { "platforms:x32", "options:os=windows" } - files { - "networking_sockets_lib/**", - "resources/win/api/32/resources.rc" - } - - filter "options:os=linux" - buildoptions { - "-fvisibility=hidden", "-fexceptions", "-fno-jump-tables", "-fno-char8_t" , "-Wundefined-internal", "-Wno-switch" - } - - linkoptions { - "-Wl,--exclude-libs,ALL" - } - filter { "options:os=linux", "configurations:**Release" } - defines { - "GNUC", "NDEBUG", "EMU_RELEASE_BUILD", "UTF_CPP_CPLUSPLUS=201703L", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - - filter { "options:os=linux", "configurations:**Debug" } - defines { - "GNUC", "DEBUG", "UTF_CPP_CPLUSPLUS=201703L", "_CRT_SECURE_NO_WARNINGS", "EMU_BUILD_STRING=".._OPTIONS["emubuild"] - } - -- Project steamnetworkingsockets END -- Project GenerateInterfaces project "GenerateInterfaces" - cppdialect("c++17") kind "ConsoleApp" - language "C++" - targetdir "bin/GenerateInterfaces/%{cfg.buildcfg}_%{cfg.platform}" - location "GBE_Build/GenerateInterfaces" + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/tools/GenerateInterfaces/%{cfg.platform}") targetname "GenerateInterfaces" - optimize "On" - symbols "Off" files { "tools/generate_interfaces/**" @@ -614,48 +858,163 @@ project "GenerateInterfaces" -- Normal (NON EXPERIMENTAL) should make the .exe -- EXPERIMENTAL should make the _extra.dll --- ONLY WINDOWS + + +-- WINDOWS ONLY TARGETS START if os.target() == "windows" then - - -- Project GameOverlayRenderer project "GameOverlayRenderer" - cppdialect("c++17") kind "SharedLib" - language "C++" - targetdir "bin/GameOverlayRenderer/%{cfg.buildcfg}_%{cfg.platform}" - location "GBE_Build/GameOverlayRenderer" + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/tools/GameOverlayRenderer/%{cfg.platform}") targetname "GameOverlayRenderer" - optimize "On" - symbols "Off" - + filter {} files { "game_overlay_renderer_lib/**" } - filter { "platforms:x64", "options:os=windows"} + filter { "platforms:x64" } includedirs { "game_overlay_renderer_lib", - default_include, - "dll/proto_gen/win", - x64_include_win + common_include, + x64_deps_include } libdirs { - x64_libsdir_win + x64_deps_libdir } - filter { "platforms:x32", "options:os=windows" } + + filter { "platforms:x32" } includedirs { "game_overlay_renderer_lib", - default_include, - "dll/proto_gen/win", - x32_include_win + common_include, + x32_deps_include } libdirs { - x32_libsdir_win + x32_deps_libdir } -- End GameOverlayRenderer +-- Project experimental_client_win (Windows only) +--------- +project "experimental_client_win" + -- https://stackoverflow.com/a/63228027 + kind "SharedLib" + filter {} -- reset the filter and remove all active keywords + + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/experimental/%{cfg.platform}") + + + -- name + --------- + filter { "platforms:x32", } + targetname "steamclient" + filter { "platforms:x64", } + targetname "steamclient64" + + + -- common source & header files + --------- + filter {} -- reset the filter and remove all active keywords + files { -- added to all filters, later defines will be appended + "steamclient/steamclient.cpp", + } + -- x32 common source files + filter { "platforms:x32", } + files { + "resources/win/client/32/resources.rc" + } + -- x64 common source files + filter { "platforms:x64", } + files { + "resources/win/client/64/resources.rc" + } +-- Project experimental_client_win (Windows only) END + + end +-- WINDOWS ONLY TARGETS END + + +-- LINUX ONLY TARGETS START +if os.target() == "linux" then + +-- Project steamclient_regular_linux (Linux only) +--------- +project "steamclient_regular_linux" + kind "SharedLib" + location "%{wks.location}/%{prj.name}" + targetdir("build/" .. os_iden .. "/%{_ACTION}/%{cfg.buildcfg}/%{cfg.platform}") + + -- name + --------- + filter { "platforms:x32", } + targetname "steamclient" + filter { "platforms:x64", } + targetname "steamclient64" + + -- defines + --------- + filter {} -- reset the filter and remove all active keywords + defines { -- added to all filters, later defines will be appended + common_emu_defines, + "STEAMCLIENT_DLL", + } + + + -- include dir + --------- + -- common include dir + filter {} -- reset the filter and remove all active keywords + includedirs { + common_include, + } + + -- x32 include dir + filter { "platforms:x32", } + includedirs { + x32_deps_include, + } + + -- x64 include dir + filter { "platforms:x64", } + includedirs { + x64_deps_include, + } + + + -- common source & header files + --------- + filter {} -- reset the filter and remove all active keywords + files { -- added to all filters, later defines will be appended + common_files, + } + + + -- libs to link + --------- + filter {} -- reset the filter and remove all active keywords + links { -- added to all filters, later defines will be appended + common_link_linux, + } + + -- libs search dir + --------- + -- x32 libs search dir + filter { "platforms:x32", } + libdirs { + x32_deps_libdir, + } + -- x64 libs search dir + filter { "platforms:x64", } + libdirs { + x64_deps_libdir, + } + +end +-- LINUX ONLY TARGETS END + + -- ONLY WINDOWS END -- Workspace END \ No newline at end of file