diff --git a/Console/xmake.lua b/Console/xmake.lua index 6e51388..2990249 100644 --- a/Console/xmake.lua +++ b/Console/xmake.lua @@ -2,14 +2,22 @@ add_rules("mode.debug", "mode.release") target("frelayConsole") set_rules("qt.console") - add_files("../Res/ico.rc") add_files("Console.cpp", "Console.h", "main.cpp") add_deps("ClientCore") add_deps("Protocol") add_deps("Util") add_frameworks("QtNetwork") + + if is_plat("windows") then + add_files("../Res/ico.rc") + end if is_plat("mingw") then + add_files("../Res/ico.rc") else add_deps("crashelper") + end + + if is_plat("linux") then + add_links("dl") end \ No newline at end of file diff --git a/Gui/xmake.lua b/Gui/xmake.lua index 95a49df..735eb10 100644 --- a/Gui/xmake.lua +++ b/Gui/xmake.lua @@ -15,8 +15,9 @@ target("frelayGUI") add_files("*.ui") add_files("*.h") add_files("../Res/frelay.qrc") - add_files("../Res/ico.rc") + if is_plat("windows") then + add_files("../Res/ico.rc") add_ldflags("-subsystem:windows") end add_frameworks("QtCore") @@ -28,7 +29,12 @@ target("frelayGUI") add_deps("ClientCore") add_deps("SingleApplication") if is_plat("mingw") then + add_files("../Res/ico.rc") add_ldflags("-mwindows") else add_deps("crashelper") + end + + if is_plat("linux") then + add_links("dl") end \ No newline at end of file diff --git a/Server/xmake.lua b/Server/xmake.lua index dbe1c9a..571f7b1 100644 --- a/Server/xmake.lua +++ b/Server/xmake.lua @@ -2,14 +2,22 @@ add_rules("mode.debug", "mode.release") target("frelayServer") set_rules("qt.console") - add_files("../Res/server.rc") add_files("Server.cpp", "Server.h", "main.cpp") add_deps("ClientCore") add_deps("Protocol") add_deps("Util") add_frameworks("QtNetwork") + if is_plat("windows") then + add_files("../Res/server.rc") + end + if is_plat("mingw") then + add_files("../Res/server.rc") else add_deps("crashelper") + end + + if is_plat("linux") then + add_links("dl") end \ No newline at end of file diff --git a/crashelper/xmake.lua b/crashelper/xmake.lua index 31639a9..0153292 100644 --- a/crashelper/xmake.lua +++ b/crashelper/xmake.lua @@ -5,3 +5,7 @@ target("crashelper") add_includedirs("include", {public = true}) add_files("src/*.cxx") add_frameworks("QtCore") + + if is_plat("linux") then + add_links("bfd", "dl") + end