mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
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.
This commit is contained in:
parent
b7cc7b4e02
commit
042e33cb13
Notes:
sideshowbarker
2024-07-17 04:34:25 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/042e33cb13 Pull-request: https://github.com/SerenityOS/serenity/pull/16293 Reviewed-by: https://github.com/linusg
1 changed files with 6 additions and 7 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue