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

CMake for qmlcachegen does not work on windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 5.12.0
    • QML: Compiler
    • None
    • Windows

      When trying to CMake our project after upgrading to Qt 5.12 we are getting this error:

      CMake Error at C:/Qt/5.12.0/msvc2017_64/lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake:23 (message):
        The package "Qt5QuickCompilerConfig" references the file     "C:/Qt/5.12.0/msvc2017_64/bin/qmlcachegen"
       but this file does not exist.  Possible reasons include:
      
        * The file was deleted, renamed, or moved to another location.
      
        * An install or uninstall procedure did not complete successfully.
      
        * The installation package was faulty and contained
      
           "C:/tkbt/Prose/ICDE/IceTools/CMakeLists.txt"
      
        but not all the files it references.

      This is because the code in that file says:

      set(compiler_path "${_qt5Core_install_prefix}/bin/qmlcachegen")
          if(NOT EXISTS "${compiler_path}" )
              message(FATAL_ERROR "The package \"Qt5QuickCompilerConfig\" references the file
         \"${compiler_path}\"
      but this file does not exist.  Possible reasons include:
      * The file was deleted, renamed, or moved to another location.
      * An install or uninstall procedure did not complete successfully.
      * The installation package was faulty and contained
         \"${CMAKE_CURRENT_LIST_FILE}\"
      but not all the files it references.
      ")
          endif()
      

      But of course on windows it's qmlcachgen.exe not just qmlcachgen. If I make that first line:

      set(compiler_path "${_qt5Core_install_prefix}/bin/qmlcachegen.exe") 

      It works fine.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shausman Simon Hausmann
            gemmell Simon Gemmell
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes