fix: linux build.

This commit is contained in:
2025-07-06 13:32:03 +08:00
parent 3323755800
commit 0d0d70d732
4 changed files with 29 additions and 3 deletions

View File

@@ -2,14 +2,22 @@ add_rules("mode.debug", "mode.release")
target("frelayConsole") target("frelayConsole")
set_rules("qt.console") set_rules("qt.console")
add_files("../Res/ico.rc")
add_files("Console.cpp", "Console.h", "main.cpp") add_files("Console.cpp", "Console.h", "main.cpp")
add_deps("ClientCore") add_deps("ClientCore")
add_deps("Protocol") add_deps("Protocol")
add_deps("Util") add_deps("Util")
add_frameworks("QtNetwork") add_frameworks("QtNetwork")
if is_plat("windows") then
add_files("../Res/ico.rc")
end
if is_plat("mingw") then if is_plat("mingw") then
add_files("../Res/ico.rc")
else else
add_deps("crashelper") add_deps("crashelper")
end
if is_plat("linux") then
add_links("dl")
end end

View File

@@ -15,8 +15,9 @@ target("frelayGUI")
add_files("*.ui") add_files("*.ui")
add_files("*.h") add_files("*.h")
add_files("../Res/frelay.qrc") add_files("../Res/frelay.qrc")
add_files("../Res/ico.rc")
if is_plat("windows") then if is_plat("windows") then
add_files("../Res/ico.rc")
add_ldflags("-subsystem:windows") add_ldflags("-subsystem:windows")
end end
add_frameworks("QtCore") add_frameworks("QtCore")
@@ -28,7 +29,12 @@ target("frelayGUI")
add_deps("ClientCore") add_deps("ClientCore")
add_deps("SingleApplication") add_deps("SingleApplication")
if is_plat("mingw") then if is_plat("mingw") then
add_files("../Res/ico.rc")
add_ldflags("-mwindows") add_ldflags("-mwindows")
else else
add_deps("crashelper") add_deps("crashelper")
end
if is_plat("linux") then
add_links("dl")
end end

View File

@@ -2,14 +2,22 @@ add_rules("mode.debug", "mode.release")
target("frelayServer") target("frelayServer")
set_rules("qt.console") set_rules("qt.console")
add_files("../Res/server.rc")
add_files("Server.cpp", "Server.h", "main.cpp") add_files("Server.cpp", "Server.h", "main.cpp")
add_deps("ClientCore") add_deps("ClientCore")
add_deps("Protocol") add_deps("Protocol")
add_deps("Util") add_deps("Util")
add_frameworks("QtNetwork") add_frameworks("QtNetwork")
if is_plat("windows") then
add_files("../Res/server.rc")
end
if is_plat("mingw") then if is_plat("mingw") then
add_files("../Res/server.rc")
else else
add_deps("crashelper") add_deps("crashelper")
end
if is_plat("linux") then
add_links("dl")
end end

View File

@@ -5,3 +5,7 @@ target("crashelper")
add_includedirs("include", {public = true}) add_includedirs("include", {public = true})
add_files("src/*.cxx") add_files("src/*.cxx")
add_frameworks("QtCore") add_frameworks("QtCore")
if is_plat("linux") then
add_links("bfd", "dl")
end