CMake and Qt (Part 3) - Hello World in CMake

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 11

  • @benhbuehler
    @benhbuehler Год назад

    One thing which confused me about cmake for a bit was that cmake_minimum_required(VERSION 3.2) and cmake_minimum_required(VERSION 3.20) are different. I can certainly see why this is the case given that a software project won't know how many minor versions they will release for each major version, but it is something I unfortunately needed to learn the hard way.

  • @frikbrits6335
    @frikbrits6335 10 месяцев назад

    How to remove qmake completely because it still want the compiler macros defined in Qt6.2?

    • @KDABtv
      @KDABtv  10 месяцев назад

      Hi,
      could you please provide us with more details so that we can help in the best way possible?

    • @frikbrits6335
      @frikbrits6335 10 месяцев назад

      @@KDABtv , when I build a project I get this warning ::
      /usr/lib64/qt6/mkspecs/features/toolchain.prf:76: error: Variable QMAKE_CXX.COMPILER_MACROS is not defined.

    • @frikbrits6335
      @frikbrits6335 10 месяцев назад

      @@KDABtv When I build a project Qt6 gives me this error ::
      /usr/lib64/qt6/mkspecs/features/toolchain.prf:76: error: Variable QMAKE_CXX.COMPILER_MACROS is not defined.

    • @frikbrits6335
      @frikbrits6335 10 месяцев назад

      @@KDABtv When I build my project I get this error " /usr/lib64/qt6/mkspecs/features/toolchain.prf:76: error: Variable QMAKE_CXX.COMPILER_MACROS is not defined. "
      What causes this error and how do I fix it?

    • @KDABtv
      @KDABtv  9 месяцев назад

      @@frikbrits6335 On www.qtcentre.org/threads/72017-QMAKE_CXX-COMPILER_MACROS-is-not-defined someone says that a reinstallation helped solving this error. Have you tried doing that? With a broken Qt6 installation it makes sense to contact the Qt Company and ask them for help.

  • @vdrmkr
    @vdrmkr 2 года назад

    Thanks

    • @KDABtv
      @KDABtv  2 года назад

      Hi!
      Thanks for watching! Glad you like our videos! 😁

  • @badassopenpolling
    @badassopenpolling 2 года назад +1

    where would be the definition of these qt specific variables in cmake, How do this file understand CMAKE_AUTOMOC ?
    Please explain inital step before writting cmakelist.txt

    • @KDABtv
      @KDABtv  2 года назад +1

      CMAKE_AUTOMOC is a builtin variable in cmake itself, which has code for generating moc files. Setting the variable CMAKE_AUTOMOC triggers this builtin support in cmake. cmake.org/cmake/help/latest/variable/CMAKE_AUTOMOC.html