diff options
author | David Faure <faure@kde.org> | 2006-02-15 11:46:32 +0000 |
---|---|---|
committer | David Faure <faure@kde.org> | 2006-02-15 11:46:32 +0000 |
commit | 53829e9233c98e57d7f8bbe8a08a941068b2f323 (patch) | |
tree | 61177452cff1642d8539dbabfa961d02bf05a3f5 | |
parent | 491fa62d29b93219cfefcf4891a31095a9b9087b (diff) | |
download | extra-cmake-modules-53829e9233c98e57d7f8bbe8a08a941068b2f323.tar.gz extra-cmake-modules-53829e9233c98e57d7f8bbe8a08a941068b2f323.tar.bz2 |
Reverting - generating moc files in subdirs worked, but this broke compilation because
the subdir (in the builddir) is missing from the -I. How could we add it?
(E.g. kdelibs/kio/kfile/kopenwith.cpp is compiled from kdelibs/kio, so the relative path
to the header is kfile/kopenwith.h, and this created a kfile/kopenwith.moc, but it's included
as "kopenwith.moc" from kopenwith.h so we need -Ikfile in the compilation line. This is
necessary for the kabc/addressbook.h vs kabc/kab/addressbook.h case)
CCMAIL: kde-buildsystem@kde.org
svn path=/trunk/KDE/kdelibs/; revision=509646
-rw-r--r-- | modules/KDE4Macros.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index f11644dd..1a2da1f4 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -242,11 +242,9 @@ MACRO(KDE4_AUTOMOC) STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE) +# set(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h) set(_header ${_abs_PATH}/${_basename}.h) - # Determine relative path to the header, so that foo/bar.h becomes foo/bar.moc - file(RELATIVE_PATH _relative_path ${CMAKE_CURRENT_SOURCE_DIR} ${_abs_PATH}) - set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_relative_path}/${_current_MOC}) - # + set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) ADD_CUSTOM_COMMAND(OUTPUT ${_moc} COMMAND ${QT_MOC_EXECUTABLE} ARGS ${_moc_INCS} ${_header} -o ${_moc} |