Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106406

gn not build in host build when not building QtWebEngine or QtPdf at the same time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.3.1
    • Build System: CMake
    • None
    • Linux/Other display system

    Description

      I want to cross-compile to an i.MX6 target. To be able to do this I need a host build first. My minimal host build environment does not include the dependencies for either QtWebEngine or QtPdf.

      The code in qtwebengine/src/CMakeLists.txt will end up here (stripped from unneeded lines):
       

      if(NOT ${QtWebEngine_SUPPORT})
       set(QT_FEATURE_qtwebengine_build OFF CACHE BOOL "Build QtWebEngine Modules" FORCE)
      endif()
      if(NOT ${QtPdf_SUPPORT})
       set(QT_FEATURE_qtpdf_build OFF CACHE BOOL "Build QtPdf" FORCE)
      endif()
      if(NOT QT_FEATURE_qtwebengine_build AND NOT QT_FEATURE_qtpdf_build)
       return()
      endif()
      
      if(NOT Gn_FOUND)
          externalproject_add(gn
      

       
      Even if I had the needed dependencies I would pass -D FEATURE_qtwebengine_build=OFF -D FEATURE_qtpdf_build=OFF here, just because I don't actually want to build them here.

      My current solution is to simply delete that "return()" line before doing the host build, which allows me to build and install Gn.

      Side note: I think this line near the end of the file is wrong as well:

      if(Gn_FOUND)
       set(copyDep ${installDir/bin/gn})
      

      This doesn't look like valid CMake syntax to me, I suspect it should have been

      if(Gn_FOUND)
       set(copyDep ${installDir}/bin/gn)
      

      Attachments

        For Gerrit Dashboard: QTBUG-106406
        # Subject Branch Project Status CR V

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            rebemlix Rolf Eike Beer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes