Re: [CMake] with cmake-3.9 my testprj breaks, I need to add "add_executable(Qt4::rcc IMPORTED)"
(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? I have used it for crosscompiling in the CMake 3.x timeframe and it worked fine as long as qmake is properly set up (i.e. has it's qt.conf so it finds it's paths). Eike -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] with cmake-3.9 my testprj breaks, I need to add "add_executable(Qt4::rcc IMPORTED)"
Hi! thanks for your quick reply. On Mon, Aug 7, 2017 at 7:56 PM, Robert Maynardwrote: > > 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 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] with cmake-3.9 my testprj breaks, I need to add "add_executable(Qt4::rcc IMPORTED)"
Did this work pre CMake 3.9? On Mon, Aug 7, 2017 at 8:49 AM, Steffen Dettmerwrote: > Hi, > > I have a cmake test project that builds a "hello world" with our > cross toolchain. There are selfmade TOOLCHAINFILES for the > targets. They define QT variables like: > > set(BT_QT_4_7_3_PATH.../taget/Qt-4.7.3) > set(QT_BINARY_DIR${BT_QT_4_7_3_PATH}/bin) > set(QT_LIBRARY_DIR ${BT_QT_4_7_3_PATH}/lib) > set(QT_MOC_EXECUTABLE${QT_BINARY_DIR}/moc) > > and so on. I tested a fix for [1] with master branch and then > also v3.9.0, but my project suddenly gets errors: > > $ git clone $r/helloworld && cd helloworld && > mkdir target4 && cd target4 && > /local/users/sdettmer/work/cmake/b/bin/cmake \ > -DCMAKE_TOOLCHAIN_FILE=$TC/$TARGET.cmake .. > -- The C compiler identification is GNU 4.4.3 > [...normal output...] > -- Configuring done > CMake Error: Qt4::rcc target not found hello_world > CMake Error: Qt4::rcc target not found mylib1 > CMake Error: Qt4::rcc target not found mylib2 > -- Generating done > -- Build files have been written to: /local/sdettmer/work/helloworld/target4 > > The "CMake Error:" lines are new. Please note, that I don't use QT rcc at all. > > I noticed that I can work around this by adding: > > set(QT_RCC_EXECUTABLE ${QT_BINARY_DIR}/rcc) > if (NOT TARGET Qt4::rcc) > add_executable(Qt4::rcc IMPORTED) > endif() > > to my TOOLCHAINFILE, but I don't understand why. moc, for > example, needs no such thing, but rcc does, but this one is not > even used. > > The message seems to come from C++ part, could it be that some QT > depenency slipped into the cmake (C++) code by accident? > > Also after the error it tells "Generating done". Does this mean > the error actually is a warning I could ignore? > > Steffen > > > > > > [1] https://gitlab.kitware.com/cmake/cmake/issues/16920 > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] with cmake-3.9 my testprj breaks, I need to add "add_executable(Qt4::rcc IMPORTED)"
Hi, I have a cmake test project that builds a "hello world" with our cross toolchain. There are selfmade TOOLCHAINFILES for the targets. They define QT variables like: set(BT_QT_4_7_3_PATH.../taget/Qt-4.7.3) set(QT_BINARY_DIR${BT_QT_4_7_3_PATH}/bin) set(QT_LIBRARY_DIR ${BT_QT_4_7_3_PATH}/lib) set(QT_MOC_EXECUTABLE${QT_BINARY_DIR}/moc) and so on. I tested a fix for [1] with master branch and then also v3.9.0, but my project suddenly gets errors: $ git clone $r/helloworld && cd helloworld && mkdir target4 && cd target4 && /local/users/sdettmer/work/cmake/b/bin/cmake \ -DCMAKE_TOOLCHAIN_FILE=$TC/$TARGET.cmake .. -- The C compiler identification is GNU 4.4.3 [...normal output...] -- Configuring done CMake Error: Qt4::rcc target not found hello_world CMake Error: Qt4::rcc target not found mylib1 CMake Error: Qt4::rcc target not found mylib2 -- Generating done -- Build files have been written to: /local/sdettmer/work/helloworld/target4 The "CMake Error:" lines are new. Please note, that I don't use QT rcc at all. I noticed that I can work around this by adding: set(QT_RCC_EXECUTABLE ${QT_BINARY_DIR}/rcc) if (NOT TARGET Qt4::rcc) add_executable(Qt4::rcc IMPORTED) endif() to my TOOLCHAINFILE, but I don't understand why. moc, for example, needs no such thing, but rcc does, but this one is not even used. The message seems to come from C++ part, could it be that some QT depenency slipped into the cmake (C++) code by accident? Also after the error it tells "Generating done". Does this mean the error actually is a warning I could ignore? Steffen [1] https://gitlab.kitware.com/cmake/cmake/issues/16920 -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake