Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which parts can I make, or nomake, while building Qt from source?

Tags:

c++

build

qt

qt5

qmake

I downloaded qt-everywhere-src-5.12.7.tar.xz which containts a README which says:

See output of `./configure -help' for documentation on various options to configure.

That output includes the following:

Component selection:

  -make <part> ......... Add <part> to the list of parts to be built.
                         Specifying this option clears the default list first.
                         [libs and examples, also tools if not cross-building,
                         also tests if -developer-build]
  -nomake <part> ....... Exclude <part> from the list of parts to be built.
  1. How can I find the names which can be used as part?

From How to compile Qt as static, I can see some options are

-nomake demos -nomake tools
  1. What about -no-webkit -no-script, is this the same as -nomake-webkit -nomake-script?

I tried the following and got an error related to -no-webkit:

$ ./configure -prefix $PWD/qtbase -opensource -release -no-webkit -no-script -no-scripttools -no-qt3support -nomake demos -nomake tools -nomake examples
+ cd qtbase
+ /home/user/Downloads/qt/qt-everywhere-src-5.12.7/qtbase/configure -top-level -prefix /home/user/Downloads/qt/qt-everywhere-src-5.12.7/qtbase -opensource -release -no-webkit -no-script -no-scripttools -no-qt3support -nomake demos -nomake tools -nomake examples
Creating qmake...
............................................................................................Done.
Info: creating super cache file /home/user/Downloads/qt/qt-everywhere-src-5.12.7/.qmake.super
Info: creating cache file /home/user/Downloads/qt/qt-everywhere-src-5.12.7/.qmake.cache
ERROR: Unknown command line option '-no-webkit'.

like image 823
KcFnMi Avatar asked Sep 19 '25 04:09

KcFnMi


1 Answers

Qt 6 now explicitly spells out the allowed values in the configure --help output. You can find this located at the base of the qtbase repository in the config_help.txt file. Make sure you have the Qt 6 version of the sources - either an expanded Qt 6 source tarball or git module checked out to a 6.x branch or tag. Below is the value:

  -make <part> ......... Add <part> to the list of parts to be built.
                         Specifying this option clears the default list first.
                         (allowed values: libs, tools, examples, tests,
                         benchmarks, manual-tests, minimal-static-tests)
                         [default: libs and examples, also tools if not
                         cross-building, also tests if -developer-build]

For Qt 5, you can see the acceptable values in configure.json located at the base of the qtbase git module directory. Make sure you have the Qt 5 version of the sources - either an expanded Qt 5 source tarball or git module checked out to a 5.x branch or tag. Below is the value:

    "make": { "type": "addString", "values": [ "examples", "libs", "tests", "tools" ] },
like image 117
Keithel Avatar answered Sep 21 '25 23:09

Keithel