-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Reilly Brogan <[email protected]>
- Loading branch information
1 parent
0ffe209
commit aca5d68
Showing
2 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
actions: | ||
- qmake_qt5: | ||
description: Invokes Qt5 with the correct default values | ||
command: | | ||
_ccache_arg="" | ||
if [[ " ${PATH[*]} " =~ "ccache" ]]; then | ||
_ccache_arg="CONFIG+=ccache" | ||
fi | ||
qmake %(options_qmake_qt5) ${_ccache_arg} | ||
dependencies: | ||
- binary(qmake) | ||
|
||
- cmake_qt6: | ||
description: Perform cmake with the default options for Qt6 builds | ||
command: | | ||
_ccache_arg="-DQT_USE_CCACHE=OFF" | ||
if [[ " ${PATH[*]} " =~ "ccache" ]]; then | ||
_ccache_arg="-DQT_USE_CCACHE=ON" | ||
fi | ||
cmake %(options_cmake_qt6) ${_ccache_arg} | ||
dependencies: | ||
- binary(cmake) | ||
|
||
- qt_user_facing_links: | ||
description: Setup user-facing binaries | ||
command: | | ||
function qt_user_facing_links() { | ||
%install_dir %(installroot)/%(bindir) | ||
pushd %(installroot) | ||
while read _line; do | ||
read -r _source _dest <<< ${_line} | ||
ln -srv %(installroot)/${_source} %(installroot)/${_dest} | ||
done < %(workdir)/%(builddir)/user_facing_tool_links.txt | ||
popd | ||
} | ||
qt_user_facing_links | ||
- qml_cache_qt5: | ||
description: Pre-compile .qml files for Qt5 applications | ||
command: | | ||
function generate_cache() { | ||
pushd %(installroot) | ||
find . -type f -name "*.qml" -print0 | while IFS= read -r -d '' i; do | ||
if ! [ -a "${i}"c ]; then | ||
qmlcachegen -o "${i}"c "${i}" $* | ||
fi | ||
done | ||
popd | ||
} | ||
generate_cache | ||
dependencies: | ||
- binary(qmlcachegen) | ||
|
||
- qml_cache_qt6: | ||
description: Pre-compile .qml files for Qt6 applications | ||
command: | | ||
function generate_qt6_cache() { | ||
pushd %(installroot) | ||
find . -type f -name "*.qml" -print0 | while IFS= read -r -d '' i; do | ||
if ! [ -a "${i}"c ]; then | ||
qmlcachegen6 -o "${i}"c "${i}" $* | ||
fi | ||
done | ||
popd | ||
} | ||
generate_qt6_cache | ||
dependencies: | ||
- binary(qmlcachegen6) | ||
|
||
definitions: | ||
- options_qmake_qt5: | | ||
CONFIG+=release \ | ||
QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ | ||
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ | ||
QMAKE_LFLAGS="${LDFLAGS}" | ||
# Default options for Qt6 builds | ||
- options_cmake_qt6: | | ||
%(options_cmake) \ | ||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ | ||
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS \ | ||
-DINSTALL_ARCHDATADIR=%(libdir)/qt6 \ | ||
-DINSTALL_BINDIR=%(libdir)/qt6/bin \ | ||
-DINSTALL_DATADIR=share/qt6 \ | ||
-DINSTALL_DOCDIR=share/doc/qt6 \ | ||
-DINSTALL_EXAMPLESDIR=%(libdir)/qt6/examples \ | ||
-DINSTALL_INCLUDEDIR=include/qt6 \ | ||
-DINSTALL_LIBDIR=%(libdir) \ | ||
-DINSTALL_LIBEXECDIR=%(libdir)/qt6 \ | ||
-DINSTALL_MKSPECSDIR=%(libdir)/qt6/mkspecs \ | ||
-DINSTALL_PUBLICBINDIR=usr/bin \ | ||
-DQT_BUILD_EXAMPLES=ON \ | ||
-DQT_FEATURE_rpath=OFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters