cmake conversion - Pb headers generated with automoc #1

已關閉
建立於 5 年前 由 Ghost · 1 則留言
Ghost 已留言 5 年前

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 加入了新的先決條件 5 年前
擁有者

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 新增到 R14.0.7 release 里程碑 5 年前
SlavekB 關閉了這個問題 5 年前
登入 才能加入這對話。
未選擇里程碑
沒有負責人
2 參與者
通知
截止日期

未設定截止日期。

先決於
#2 cmake conversion
TDE/kasablanca
參考: TDE/kasablanca#1
載入中…
尚未有任何內容