Skip to content

Commit 0d7544b

Browse files
Refactor build_qt_static function to use CMake for building and installing Qt static libraries
1 parent 9d02e71 commit 0d7544b

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

scripts/ci_linux.sh

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,20 @@ build_qt_static() {
2727

2828
cd qtbase || exit
2929

30-
./configure -static -release \
31-
-prefix "$qt_static_dir" \
32-
-platform linux-clang \
33-
-opensource -confirm-license \
34-
-nomake examples -nomake tests \
35-
-developer-build \
36-
-- -Wno-dev CXXFLAGS+="-DFORCE_STATIC_QT"
30+
mkdir -p build && cd build || exit
31+
32+
cmake .. \
33+
-G "Ninja" \
34+
-DCMAKE_INSTALL_PREFIX="$qt_static_dir" \
35+
-DCMAKE_BUILD_TYPE=Release \
36+
-DBUILD_SHARED_LIBS=OFF \
37+
-DFORCE_STATIC_QT \
38+
-DINPUT_opengl=yes \
39+
-DINPUT_widgets=yes \
40+
-DQT_BUILD_TESTS=OFF \
41+
-DQT_BUILD_EXAMPLES=OFF
3742

38-
cmake --build . --parallel "$nproc"
39-
cmake --install . --prefix "$qt_static_dir"
40-
41-
cd .. && cd ..
43+
cmake --build . --target install --parallel "$nproc"
4244
}
4345

4446
build_zclipboard() {

0 commit comments

Comments
 (0)