6
0
Fork 0

cmake conversion - Pb headers generated with automoc #1

Geschlossen
vor 5 Jahren geöffnet von Ghost · 1 Kommentare
Ghost hat vor 5 Jahren kommentiert

While trying to bring cmake support in Kasablanca, I've run into something rather peculiar.

I get this error:

AUTOMOC error: 'Q_mainwindow.moc' cannot be generated.
   Reason: '/home/cethyel/Public/trinity-pot/CMAKECONV/kasablanca/src/Q_mainwindow.cpp.h' not found.

I've overcome this by generating Q_mainwindow.h manually:

tquic Q_mainwindow.ui | perl -pe "s,public TQWizard,public KWizard,g; s,#include <ntqwizard.h>,#include <kwizard.h>,g; s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> Q_mainwindow.h ;

Same problem goes on with:

  • Q_bookmarkdialog.ui
  • Q_fileexistsdialog.ui
  • Q_mainwindow.ui
  • Q_colorspreferencesdialog.ui
  • Q_userinterfacepreferencesdialog.ui
  • Q_generalpreferencesdialog.ui
  • Q_customconnectdialog.ui
  • Q_importdialog.ui

Here is how I try to build the executable:

tde_add_executable( kasablanca AUTOMOC
  SOURCES
         kbconfig.kcfgc
         Q_bookmarkdialog.ui Q_fileexistsdialog.ui
         Q_mainwindow.ui Q_colorspreferencesdialog.ui
         Q_userinterfacepreferencesdialog.ui Q_generalpreferencesdialog.ui
         Q_customconnectdialog.ui Q_importdialog.ui
         main.cpp kasablanca.cpp bookmarkdialog.cpp customconnectdialog.cpp
         fileexistsdialog.cpp kbitem.cpp 
         eventhandler.cpp ftpthread.cpp ftplib.cpp ftpsession.cpp
         kbfileinfo.cpp kbdirinfo.cpp kbdir.cpp kbfile.cpp kbtransferitem.cpp
         kbtransferdir.cpp kbtransferfile.cpp
         kbtaskview.cpp kbbookmarkitem.cpp kbsiteinfo.cpp
         importdialog.cpp kbstatustip.cpp
  LINK tdeui-shared tdecore-shared tdeio-shared ssl crypto
While trying to bring cmake support in Kasablanca, I've run into something rather peculiar. I get this error: ``` AUTOMOC error: 'Q_mainwindow.moc' cannot be generated. Reason: '/home/cethyel/Public/trinity-pot/CMAKECONV/kasablanca/src/Q_mainwindow.cpp.h' not found. ``` I've overcome this by generating Q_mainwindow.h manually: ``` tquic Q_mainwindow.ui | perl -pe "s,public TQWizard,public KWizard,g; s,#include <ntqwizard.h>,#include <kwizard.h>,g; s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> Q_mainwindow.h ; ``` Same problem goes on with: - Q_bookmarkdialog.ui - Q_fileexistsdialog.ui - Q_mainwindow.ui - Q_colorspreferencesdialog.ui - Q_userinterfacepreferencesdialog.ui - Q_generalpreferencesdialog.ui - Q_customconnectdialog.ui - Q_importdialog.ui Here is how I try to build the executable: ``` tde_add_executable( kasablanca AUTOMOC SOURCES kbconfig.kcfgc Q_bookmarkdialog.ui Q_fileexistsdialog.ui Q_mainwindow.ui Q_colorspreferencesdialog.ui Q_userinterfacepreferencesdialog.ui Q_generalpreferencesdialog.ui Q_customconnectdialog.ui Q_importdialog.ui main.cpp kasablanca.cpp bookmarkdialog.cpp customconnectdialog.cpp fileexistsdialog.cpp kbitem.cpp eventhandler.cpp ftpthread.cpp ftplib.cpp ftpsession.cpp kbfileinfo.cpp kbdirinfo.cpp kbdir.cpp kbfile.cpp kbtransferitem.cpp kbtransferdir.cpp kbtransferfile.cpp kbtaskview.cpp kbbookmarkitem.cpp kbsiteinfo.cpp importdialog.cpp kbstatustip.cpp LINK tdeui-shared tdecore-shared tdeio-shared ssl crypto ```
SlavekB hat eine neue Abhängigkeit vor 5 Jahren hinzugefügt
SlavekB hat vor 5 Jahren kommentiert
Besitzer

The solution turned out to be easier than I expected. The CPP files that cause the problem should not have been part of the source code – these are generated files. Therefore, simply removing the files was enough to solve the problem. Then, instead of unintentionally processing these CPP files from the source directory, the CPP files are processed from the binary directory and therefore everything is done properly.

The solution turned out to be easier than I expected. The CPP files that cause the problem should not have been part of the source code – these are generated files. Therefore, simply removing the files was enough to solve the problem. Then, instead of unintentionally processing these CPP files from the source directory, the CPP files are processed from the binary directory and therefore everything is done properly.
SlavekB hat diesen Issue vor 5 Jahren zum R14.0.7 release Meilenstein hinzugefügt
SlavekB hat diesen Issue vor 5 Jahren geschlossen
Anmelden, um an der Diskussion teilzunehmen.
Kein Meilenstein
Niemand zuständig
2 Beteiligte
Nachrichten
Fällig am

Kein Fälligkeitsdatum gesetzt.

Abhängig von
#2 cmake conversion
TDE/kasablanca
Referenz: TDE/kasablanca#1
Laden…
Hier gibt es bis jetzt noch keinen Inhalt.