View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0007102 | CMake | CMake | public | 2008-05-27 04:43 | 2008-06-10 17:52 | ||||
Reporter | Andrey Rahmatullin | ||||||||
Assigned To | Alex Neundorf | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0007102: QT4_GENERATE_MOC doesn't generate any rules | ||||||||
Description | Test project: foo.cpp: #include <QObject> #include "foo.moc" class Foo: public QObject { Q_OBJECT }; CMakeLists.txt: cmake_minimum_required(VERSION 2.6) FIND_PACKAGE(Qt4 REQUIRED) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES} ) QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/foo.cpp foo.moc) ADD_EXECUTABLE( foo foo.cpp ) TARGET_LINK_LIBRARIES( foo ${QT_LIBRARIES} ) Make complains about foo.moc not found. That's correct, foo.moc generating rule wasn't added. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0012304) Alex Neundorf (developer) 2008-06-10 17:52 |
The rule is not generated because the generated foo.moc is not used anywhere (from the cmake POV). Add foo.moc to the list of source files (and use the full path): SET(FOO_MOC_FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.moc") .... ADD_EXECUTABLE( foo foo.cpp ${FOO_MOC_FILE}) This should make it work. If it doesn't, please reopen the bug report. Alex |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-05-27 04:43 | Andrey Rahmatullin | New Issue | |
2008-05-27 09:00 | Bill Hoffman | Status | new => assigned |
2008-05-27 09:00 | Bill Hoffman | Assigned To | => Alex Neundorf |
2008-06-10 17:52 | Alex Neundorf | Note Added: 0012304 | |
2008-06-10 17:52 | Alex Neundorf | Status | assigned => closed |
2008-06-10 17:52 | Alex Neundorf | Resolution | open => no change required |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |