Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. automoc in cmake missed creating a required moc file
Forum Updated to NodeBB v4.3 + New Features

automoc in cmake missed creating a required moc file

Scheduled Pinned Locked Moved Installation and Deployment
1 Posts 1 Posters 491 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CathyG
    wrote on last edited by
    #1

    I am building meshlab with cmake and it relies on Qt, so I need to use automoc.
    In the meshlab directory the implementation of a class (MainWindow) is split between two .cpp files, mainwindow_Init.cpp and mainwindow_Runtime.cpp, but they share the header file mainwindow.h. Initially when creating my add_executable command to my CMakeLists.txt file, I only included .cpp files. automoc was not creating the required moc_mainwindow.cpp.

    The solution was to add mainwindow.h to the list of files in the add_executable command.

    Including this here, because it took various searches and a bit of insight to figure this out, so maybe someone else will get there sooner!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved