From 22e031b533b4ffb1f00950c495e7a418afe14e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Fri, 30 Jul 2021 11:04:01 +0200 Subject: [PATCH] Try to install Qt from xmake --- .github/workflows/linux-build.yml | 4 ---- .github/workflows/windows-build.yml | 4 ---- tools/xmake.lua | 1 + xmake-repo/packages/q/qt5base/xmake.lua | 2 ++ xmake-repo/packages/q/qt5core/xmake.lua | 2 +- xmake-repo/packages/q/qt5gui/xmake.lua | 2 +- xmake-repo/packages/q/qt5widgets/xmake.lua | 2 +- 7 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index d9257ee74..3d56be256 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -27,10 +27,6 @@ jobs: steps: - uses: actions/checkout@v2 - # Install Qt (required for shader nodes editor) - - name: Install Qt - uses: jurplel/install-qt-action@v2 - # Install Nazara dependencies - name: Update apt repositories run: sudo apt-get update diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 0ab09ad9d..fb7bd6fbd 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -27,10 +27,6 @@ jobs: steps: - uses: actions/checkout@v2 - # Install Qt (required for shader nodes editor) - - name: Install Qt - uses: jurplel/install-qt-action@v2 - # Force xmake to a specific folder (for cache) - name: Set xmake env run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append diff --git a/tools/xmake.lua b/tools/xmake.lua index 22b3f54f7..82efff569 100644 --- a/tools/xmake.lua +++ b/tools/xmake.lua @@ -96,6 +96,7 @@ target("NazaraShaderNodes") add_deps("NazaraShader") add_packages("nodeeditor") add_packages("qt5core", "qt5gui", "qt5widgets") + add_cxflags("-fPIC") add_includedirs("../src") add_headerfiles("../src/ShaderNode/**.hpp", "../src/ShaderNode/**.inl") diff --git a/xmake-repo/packages/q/qt5base/xmake.lua b/xmake-repo/packages/q/qt5base/xmake.lua index b4d803a78..cb39ead5d 100644 --- a/xmake-repo/packages/q/qt5base/xmake.lua +++ b/xmake-repo/packages/q/qt5base/xmake.lua @@ -42,6 +42,8 @@ package("qt5base") -- move files to root local installeddir = path.join(installdir, version, package:is_plat("windows") and "msvc2019_64" or "gcc_64", "*") os.mv(installeddir, installdir) + os.rmdir(path.join(installdir, version) + package:data_set("qtdir", { bindir = path.join(installdir, "bin"), includedir = path.join(installdir, "include"), diff --git a/xmake-repo/packages/q/qt5core/xmake.lua b/xmake-repo/packages/q/qt5core/xmake.lua index 16fe4abc8..df975f05e 100644 --- a/xmake-repo/packages/q/qt5core/xmake.lua +++ b/xmake-repo/packages/q/qt5core/xmake.lua @@ -12,7 +12,7 @@ package("qt5core") return { qtdir = qt, - links = table.wrap("Qt5Core" .. (package:is_debug() and "d" or "")), + links = table.wrap("Qt5Core" .. (package:is_plat("windows") and package:is_debug() and "d" or "")), linkdirs = table.wrap(qt.libdir), includedirs = table.wrap(qt.includedir) } diff --git a/xmake-repo/packages/q/qt5gui/xmake.lua b/xmake-repo/packages/q/qt5gui/xmake.lua index cee573442..1166f597a 100644 --- a/xmake-repo/packages/q/qt5gui/xmake.lua +++ b/xmake-repo/packages/q/qt5gui/xmake.lua @@ -11,7 +11,7 @@ package("qt5gui") local qt = base:data("qtdir") return { - links = table.wrap("Qt5Gui" .. (package:is_debug() and "d" or "")), + links = table.wrap("Qt5Gui" .. (package:is_plat("windows") and package:is_debug() and "d" or "")), linkdirs = table.wrap(qt.libdir), includedirs = table.wrap(qt.includedir) } diff --git a/xmake-repo/packages/q/qt5widgets/xmake.lua b/xmake-repo/packages/q/qt5widgets/xmake.lua index 2f86d2249..d99f7ae0f 100644 --- a/xmake-repo/packages/q/qt5widgets/xmake.lua +++ b/xmake-repo/packages/q/qt5widgets/xmake.lua @@ -11,7 +11,7 @@ package("qt5widgets") local qt = base:data("qtdir") return { - links = table.wrap("Qt5Widgets" .. (package:is_debug() and "d" or "")), + links = table.wrap("Qt5Widgets" .. (package:is_plat("windows") and package:is_debug() and "d" or "")), linkdirs = table.wrap(qt.libdir), includedirs = table.wrap(qt.includedir) }