view src/qt6-qt5compat.mk @ 6944:9414e8cf3e4f

Minor overhaul of Qt6 build rules * src/qt6-qt5compat.mk, src/qt6-qtbase.mk, src/qt6-qtimageformats.mk, src/qt6-qtsvg.mk, src/qt6-qttools.mk, src/qt6-qttranslations.mk: Use Ninja generator (only generator supported by upstream). Specify source and build tree directories in CMake configuration flags. Use separate build tree.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 29 Oct 2023 10:45:35 +0100
parents b0e560738283
children 6bef17ab3e08
line wrap: on
line source

# This file is part of MXE.
# See index.html for further information.

PKG             := qt6-qt5compat
$(PKG)_IGNORE   :=
$(PKG)_VERSION   = $(qt6-qtbase_VERSION)
$(PKG)_CHECKSUM := d4f002a7cf27dc35665049954c263607d2c41df6
$(PKG)_SUBDIR    = $(subst qtbase,qt5compat,$(qt6-qtbase_SUBDIR))
$(PKG)_FILE      = $(subst qtbase,qt5compat,$(qt6-qtbase_FILE))
$(PKG)_URL       = $(subst qtbase,qt5compat,$(qt6-qtbase_URL))
$(PKG)_DEPS     := qt6-qtbase

define $(PKG)_UPDATE
    echo $(qt6-qtbase_VERSION)
endef

define $(PKG)_BUILD
    '$(HOST_PREFIX)/qt6/bin/qt-cmake-private' \
      -S '$(1)' -B '$(1).build' \
      -DCMAKE_INSTALL_PREFIX='$(HOST_PREFIX)/qt6'
    cmake --build '$(1).build' -j '$(JOBS)'
    cmake --install '$(1).build'
    if [ $(MXE_WINDOWS_BUILD) = yes ]; then \
      $(INSTALL) -d '$(HOST_BINDIR)'; \
      cp '$(HOST_PREFIX)'/qt6/bin/Qt6Core5Compat.dll '$(HOST_BINDIR)'/Qt6Core5Compat.dll; \
    fi
endef