Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt build Options to skip few modules through configuration file ?
Forum Update on Monday, May 27th 2025

Qt build Options to skip few modules through configuration file ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 19.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ambershark
    wrote on 27 Feb 2017, 03:54 last edited by
    #2

    Are you worried about typing out a big command line for configure or having it become so big that the shell won't handle it?

    If the former, I usually just make a bash script that I execute, i.e.:

    my-config:

    ./configure <my options>
    
    $ chmod 755 my-config
    $ ./my-config
    

    My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

    1 Reply Last reply
    3
    • D Offline
      D Offline
      dheerendra
      Qt Champions 2022
      wrote on 27 Feb 2017, 04:20 last edited by
      #3

      :) Not a typing issue. I would like to ensure that I don't any mistake while placing all this. I thought Qt should have some option for this. I saw a file called configure.json. However configure command has no way to give this as input. Not sure how. I'm investigating now.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      A 1 Reply Last reply 27 Feb 2017, 04:21
      2
      • D dheerendra
        27 Feb 2017, 04:20

        :) Not a typing issue. I would like to ensure that I don't any mistake while placing all this. I thought Qt should have some option for this. I saw a file called configure.json. However configure command has no way to give this as input. Not sure how. I'm investigating now.

        A Offline
        A Offline
        ambershark
        wrote on 27 Feb 2017, 04:21 last edited by
        #4

        @dheerendra There may be, I've never seen/used it as I always just write a my-config file for my stuff. That way it also let's me remember my configure for each build as it will sit in the build directory.

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dheerendra
          Qt Champions 2022
          wrote on 27 Feb 2017, 04:31 last edited by
          #5

          cool. Thank you. Silly question..can I specify the -skip <module1> <module2> like this ? Saving my time :)

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          A 1 Reply Last reply 27 Feb 2017, 04:33
          3
          • D dheerendra
            27 Feb 2017, 04:31

            cool. Thank you. Silly question..can I specify the -skip <module1> <module2> like this ? Saving my time :)

            A Offline
            A Offline
            ambershark
            wrote on 27 Feb 2017, 04:33 last edited by
            #6

            @dheerendra I think each one needs a -skip but that could have changed since I last tried it or it could just be wrong. You can test it but I think each one requires a skip.

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Fly Fan
              wrote on 27 Feb 2017, 09:12 last edited by Fly Fan
              #7

              First, find the feature list file which locates at "qtbase\src\corelib\global\qfeatures.txt".

              Then, drop some features you don't want by configuration command like this -- "configure.bat -static -release -platform win32-g++ -no-opengl -prefix "C:\Qt\Qt5.8.0_MinGW_static" -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-concurrent -no-feature-effects -no-feature-sharedmemory -no-feature-systemsemaphore -no-feature-im -no-feature-process -no-feature-dom -no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-graphicsview -no-feature-graphicseffect -no-feature-sizegrip -no-feature-calendarwidget -no-feature-printpreviewwidget -no-feature-keysequenceedit -no-feature-colordialog -no-feature-filedialog -no-feature-fontdialog -no-feature-printpreviewdialog -no-feature-progressdialog -no-feature-inputdialog -no-feature-errormessage -no-feature-wizard -no-feature-datawidgetmapper -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_png -no-feature-imageformat_jpeg -no-feature-image_heuristic_mask -no-feature-image_text -no-feature-colornames -no-feature-cups -no-feature-paint_debug -no-feature-freetype -no-feature-translation -no-feature-codecs -no-feature-big_codecs -no-feature-iconv -no-feature-ftp -no-feature-udpsocket -no-feature-networkproxy -no-feature-socks5 -no-feature-networkdiskcache -no-feature-bearermanagement -no-feature-completer -no-feature-fscompleter -no-feature-desktopservices -no-feature-mimetype -no-feature-systemtrayicon -no-feature-undocommand -no-feature-undostack -no-feature-undogroup -no-feature-undoview -no-feature-statemachine -no-feature-gestures -no-feature-dbus"

              In fact, Qt has provided Qt Configuration Tool which is a GUI application for the Qt feature system. You can open the link (http://doc.qt.io/QtEnterpriseEmbedded/qt-configuration-tool.html ) for more information. However, I have not found the link to download the tool. If you can find the tool, please tell me. Thanks.

              PS: Some features may be marked as unessential module in the feature file, while they are important for your software like the type, Qsetting, which is essential for the GUI (maybe Core) module.

              1 Reply Last reply
              5
              • F Offline
                F Offline
                Fly Fan
                wrote on 27 Feb 2017, 09:25 last edited by
                #8
                This post is deleted!
                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dheerendra
                  Qt Champions 2022
                  wrote on 27 Feb 2017, 17:47 last edited by
                  #9

                  Thank you @Fly-Fan
                  qtbase\src\corelib\global\qfeatures.txt file NOT there in Qt 5.8 GIT checkout. Also modules names are same as the directory name exist in Qt source code. e.g if the directory name is qtcharts, if you don't want to build qtcharts just pass
                  -skip qtcharts. For each of the modules you need to specify the skip separately
                  e.g ./configure -skip qtcharts -skip qtquickcontrols

                  Th

                  Dheerendra
                  @Community Service
                  Certified Qt Specialist
                  http://www.pthinks.com

                  F 1 Reply Last reply 28 Feb 2017, 03:30
                  4
                  • D dheerendra
                    27 Feb 2017, 17:47

                    Thank you @Fly-Fan
                    qtbase\src\corelib\global\qfeatures.txt file NOT there in Qt 5.8 GIT checkout. Also modules names are same as the directory name exist in Qt source code. e.g if the directory name is qtcharts, if you don't want to build qtcharts just pass
                    -skip qtcharts. For each of the modules you need to specify the skip separately
                    e.g ./configure -skip qtcharts -skip qtquickcontrols

                    Th

                    F Offline
                    F Offline
                    Fly Fan
                    wrote on 28 Feb 2017, 03:30 last edited by Fly Fan
                    #10

                    @dheerendra

                    Partially correct. Many features are attached to one another, in that the feature list file is necessary which can provide you more infornation. But to my dismay, there are some errors in the file or I have not understood the file completely, like the Qsetting type I have mentioned before.

                    The version of Qt I have installed is qt-opensource-windows-x86-mingw530-5.8.0 and you can download it in the link --http://download.qt.io/official_releases/qt/5.8/5.8.0/. When install Qt, selecting the source option is necessary. I install Qt in this folder -- "C:\Qt", so the feature list file can be found at "C:\Qt\Qt5.8.0\5.8\Src\qtbase\src\corelib\global\qfeatures".

                    The following content is a part of qfeatures.txt file.

                    Generic entry format

                    #Feature: UPPERCASENAME (for the #define)
                    #Description: One sentence description of what this does.
                    #Section: Categorization
                    #Requires: UPPERCASENAME...
                    #Name: CamelCaseName (often a class name)
                    #SeeAlso: UPPERCASENAME... (currently unused)

                    Kernel

                    Feature: PROPERTIES
                    Description: Supports scripting Qt-based applications.
                    Section: Kernel
                    Requires:
                    Name: Properties

                    Feature: TEXTHTMLPARSER
                    Description: Parser for HTML
                    Section: Kernel
                    Requires:
                    Name: HtmlParser

                    Feature: TEXTODFWRITER
                    Description: Provides an ODF writer
                    Section: Kernel
                    Requires: XMLSTREAMWRITER
                    Name: OdfWriter

                    Feature: CSSPARSER
                    Description: Parser for Style Sheets
                    Section: Kernel
                    Requires:
                    Name: CssParser

                    Feature: REGULAREXPRESSION
                    Description: Perl-compatible regular expression APIs
                    Section: Kernel
                    Requires:
                    Name: QRegularExpression

                    Feature: CONCURRENT
                    Description: Provides a high-level multi-threaded APIs
                    Section: Kernel
                    Requires:
                    Name: QtConcurrent

                    Feature: DRAGANDDROP
                    Description: Supports the drag and drop mechansim.
                    Section: Kernel
                    Requires: IMAGEFORMAT_XPM
                    Name: Drag and drop
                    .........................
                    ..........................

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      Fly Fan
                      wrote on 28 Feb 2017, 12:46 last edited by Fly Fan
                      #11

                      It seems that I have misunderstood your question aimed at reducing some modules which are unnecessary to your software. Opening Qt assistant, typing and searching the keywords --all modules, you will get what you want. Using command line like -skip qtcanvas3d -skip qtcharts to drop canvas3d and qtcharts modules.

                      The features I mentioned before is derived from Qt Lite project aimed at creating a more lightweight set of libraries for deployment. A rewritten configuration system that allows for easy customization of Qt builds is introduced by Qt 5.8. Removing some features uncessary to your program will reduce software volume further more.

                      1 Reply Last reply
                      2

                      11/11

                      28 Feb 2017, 12:46

                      • Login

                      • Login or register to search.
                      11 out of 11
                      • First post
                        11/11
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved