[CMake] re-moc not occurring
Craig Bradney
cbradney at zip.com.au
Wed Jun 7 17:02:41 EDT 2006
On Wednesday 07 June 2006 22:51, Alexander Neundorf wrote:
> > -------- Original-Nachricht --------
> > Datum: Wed, 7 Jun 2006 22:50:21 +0200
> > Von: Craig Bradney <cbradney at zip.com.au>
> > An: cmake at www.cmake.org
> > Betreff: [CMake] re-moc not occurring
> >
> > Hi,
> >
> > I'm wondering if theres been any known issues with regards to moc not
> > being
> > rerun after changes to the .h/.cpp files? We seem to hit this a lot with
> > Scribus. There might be a slight chance it happens more often when
> > building
> > out of source. Any ideas? What further info shall I give?
>
> How do you generate the moc rules ?
> QT4_WRAP_CPP(), QT4_AUTOMOC() or QT4_GENERATE_MOC() ?
Scribus is Qt3.. so..
IF(QT_WRAP_CPP)
SCRIBUS_QT_WRAP_CPP(scribus ${SCRIBUS_MOC_CLASSES})
ENDIF(QT_WRAP_CPP)
Where SCRIBUS_MOC_CLASSES is a list of the header files requiring moc'ing..
and the SCRIBUS_QT_WRAP_CPP is as follows, partly based on your previous
advice
(http://mail.kde.org/pipermail/kde-buildsystem/2006-March/002063.html)
..
MACRO(SCRIBUS_QT_WRAP_CPP outfiles )
# get include dirs
FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
SET(infile ${CMAKE_CURRENT_SOURCE_DIR}/${it})
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}.moc)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile})
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH(it)
ENDMACRO(SCRIBUS_QT_WRAP_CPP)
tnx
Craig
More information about the CMake
mailing list