[CMake] with cmake-3.9 my testprj breaks, I need to add "add_executable(Qt4::rcc IMPORTED)"

Steffen Dettmer steffen.dettmer at gmail.com
Tue Aug 8 03:45:19 EDT 2017


Hi!

thanks for your quick reply.

On Mon, Aug 7, 2017 at 7:56 PM, Robert Maynard
<robert.maynard at kitware.com> wrote:
> >  CMake Error: Qt4::rcc target not found hello_world
>
> Did this work pre CMake 3.9?

Yes, it did. However I missed that some of our CMakeLists.txt
has "add_executable(Qt4::moc IMPORTED)". So the change seems only
to be that before QT4::rcc was not checked, but supposed to be set
since all the time. It is integral part of QT so there is no
reason to have moc but not rcc.

A team mate said that this is because we don't use find_lib(QT)
which internally handles all that, and that cmake has to perform
a lot of "magic" for QT, as it is not just "an ordinary library"
but much more, formally even an own programming language.

  (and we don't use find_lib(QT) because once upon a time it was
  tried but not instantly found working for cross compiling).

We're investigating whether we simply can switch to find_lib(QT)
which should solve that.

Does this make sense or am I mislead?

Steffen


More information about the CMake mailing list