From 53829e9233c98e57d7f8bbe8a08a941068b2f323 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 15 Feb 2006 11:46:32 +0000 Subject: 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 --- modules/KDE4Macros.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules') 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} -- cgit v1.2.1