[CMake] Qt3

olivier.stern at swing.be olivier.stern at swing.be
Wed Jul 27 06:30:31 EDT 2005



Hi,

As I must use Qt 3 in a program with libraries using cmake to produce a makefile, I try to generate a makefile with a simple Qt3 projet. Here is the project:

http://www.digitalfanatics.org/projects/qt_tutorial/fr/chapter05.html

At the end of it, I ve got 4 files: simple-dialog.pro, main.cpp, dlgmain.ui.h and dlgmain.ui.
I've wrote here a time ago but I had troubles with libraries and didn't continue...

Here is the CMakeLists.txt advised:

FIND_PACKAGE(Qt) 
 
ADD_DEFINITIONS(${QT_DEFINITIONS}) 
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) 

QT_WRAP_CPP(qtwrapping moc_sources dlgmain.ui.h) 
QT_WRAP_UI(qtwrapping headers sources dlgmain.ui) 
ADD_EXECUTABLE(qtwrapping main.cpp ${moc_sources} ${headers} ${sources}) 
TARGET_LINK_LIBRARIES(qtwrapping ${QT_LIBRARIES}) 

When I try to configure with ccmake, here the error which appears:

 CMake Error: Attempt to add a custom rule to output \"/home/olivier/Projets/Tfe/Qt-gcc/moc_dlgmain.cxx\" which already has
 a custom rule.

Does anyone had this problem ?

Thx,
   Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20050727/a6a13acc/attachment.htm


More information about the CMake mailing list