From 15cdf406d629d80e83910cd064bdb832057e64ca Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Mon, 5 Jan 2004 11:13:50 -0500 Subject: BUG: Fix dependency to input file for QT_WRAP_CPP. Bug #421 - QT_WRAP_CPP --- Source/cmQTWrapCPPCommand.cxx | 5 ++++- Tests/Wrapping/CMakeLists.txt | 2 +- Tests/Wrapping/vtkTestMoc.h | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 Tests/Wrapping/vtkTestMoc.h diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index a446ded..6bc9798 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -144,12 +144,15 @@ void cmQTWrapCPPCommand::FinalPass() args.push_back(res); args.push_back(m_WrapHeaders[classNum]); + std::vector realdepends = depends; + realdepends.push_back(m_WrapHeaders[classNum]); + m_Makefile->AddCustomCommandToOutput( res.c_str(), moc_exe.c_str(), args, 0, - depends, + realdepends, "QT Wrapped File", 0); } diff --git a/Tests/Wrapping/CMakeLists.txt b/Tests/Wrapping/CMakeLists.txt index 7a74826..8aeec0d 100644 --- a/Tests/Wrapping/CMakeLists.txt +++ b/Tests/Wrapping/CMakeLists.txt @@ -118,7 +118,7 @@ IF (QT_FOUND) ${CMAKE_CURRENT_BINARY_DIR}/foo.ui ) QT_WRAP_UI (myqtlib QTUI_H_SRCS QTUI_S_SRCS ${QTUI_SRCS}) - QT_WRAP_CPP (myqtlib QT_MOC_SRCS ${SRCS}) + QT_WRAP_CPP (myqtlib QT_MOC_SRCS ${SRCS} vtkTestMoc.h) MESSAGE("QT files are ${QTUI_S_SRCS}") MESSAGE("QT other files are ${QTUI_H_SRCS}") diff --git a/Tests/Wrapping/vtkTestMoc.h b/Tests/Wrapping/vtkTestMoc.h new file mode 100644 index 0000000..f11a927 --- /dev/null +++ b/Tests/Wrapping/vtkTestMoc.h @@ -0,0 +1,8 @@ +#include + +class Foo : public QApplication +{ + Q_OBJECT +public: + Foo(); +}; -- cgit v0.12