summaryrefslogtreecommitdiff
path: root/Ports/qt6-serenity
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-12-03 09:23:37 -0700
committerLinus Groh <mail@linusgroh.de>2022-12-03 23:16:16 +0000
commit042e33cb13a75425ad978064cc1dbabf362c227a (patch)
tree31ecb4e085cad94c2a5fbffae65d88fcf83cf577 /Ports/qt6-serenity
parentb7cc7b4e024e8ea1ae2266557afd14872728dde8 (diff)
downloadserenity-042e33cb13a75425ad978064cc1dbabf362c227a.zip
Ports: Clean up host path detection in qt6-serenity
Follow the same pattern as the other Qt ports to use qmake to determine the location of host binaries and libraries.
Diffstat (limited to 'Ports/qt6-serenity')
-rwxr-xr-xPorts/qt6-serenity/package.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/Ports/qt6-serenity/package.sh b/Ports/qt6-serenity/package.sh
index 3349f7081d..cbd95c30b5 100755
--- a/Ports/qt6-serenity/package.sh
+++ b/Ports/qt6-serenity/package.sh
@@ -9,15 +9,14 @@ configopts=(
"-GNinja"
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
"-DCMAKE_CROSSCOMPILING=ON"
- "-DQT_HOST_PATH=/usr"
)
-QT_HOST_PATH=/usr
-QT_HOST_CMAKE_PATH=${QT_HOST_PATH}/lib64/cmake
-QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
-QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
-
configure() {
+ QT_HOST_PATH="$(qmake6 -query QT_HOST_PREFIX)"
+ QT_HOST_CMAKE_PATH="$(qmake6 -query QT_HOST_LIBS)/cmake"
+ QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
+ QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
+
for host_tool in ${QT_HOST_TOOLS}; do
if [[ ! -d $(printf $QT_HOST_TOOLS_PATH $host_tool) ]]; then
echo "You need to have Qt installed on the host (path "$(printf $QT_HOST_TOOLS_PATH $host_tool)" is missing"
@@ -27,7 +26,7 @@ configure() {
MERGED_HOST_TOOLS=$(for host_tool in ${QT_HOST_TOOLS}; do echo "-DQt6${host_tool}_DIR=${QT_HOST_CMAKE_PATH}/Qt6${host_tool}/"; done)
- run cmake ${configopts[@]} ${MERGED_HOST_TOOLS}
+ run cmake ${configopts[@]} "-DQT_HOST_PATH=${QT_HOST_PATH}" ${MERGED_HOST_TOOLS}
}
build() {