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

CMake cannot find a moc and rcc commands

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.4.1
    • Build tools: Other
    • None
    • Linux: reproduced

    Description

      CMake is not filing Makefiles with a valid path to a moc (rcc) commands, instead its using empty string. I have a proposed fix, but since I'm know only CMake basis I'm not sure if it's totally fine. At least it works

      --- Qt5CoreConfigExtras.cmake.orig	2015-06-26 12:49:34.942172824 +0200
      +++ Qt5CoreConfigExtras.cmake	2015-06-26 12:25:03.081513065 +0200
      @@ -34,10 +34,6 @@
           )
       endif()
       
      -set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
      -set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
      -set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
      -
       set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_MAJOR_VERSION 5)
       set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_COORD_TYPE double)
       set_property(TARGET Qt5::Core APPEND PROPERTY
      --- Qt5CoreMacros.cmake.orig	2015-06-26 12:49:49.898585697 +0200
      +++ Qt5CoreMacros.cmake	2015-06-26 12:25:43.618633870 +0200
      @@ -130,7 +130,7 @@
       
           set(_moc_extra_parameters_file @${_moc_parameters_file})
           add_custom_command(OUTPUT ${outfile}
      -                       COMMAND ${Qt5Core_MOC_EXECUTABLE} ${_moc_extra_parameters_file}
      +                       COMMAND Qt5::moc ${_moc_extra_parameters_file}
                              DEPENDS ${infile}
                              ${_moc_working_dir}
                              VERBATIM)
      @@ -229,7 +229,7 @@
               endif()
       
               add_custom_command(OUTPUT ${outfile}
      -                           COMMAND ${Qt5Core_RCC_EXECUTABLE}
      +                           COMMAND Qt5::rcc
                                  ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
                                  MAIN_DEPENDENCY ${infile}
                                  DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
      

      Attachments

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

        Activity

          People

            krf Kevin Funk
            qba Jakub Kotur
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes