diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-10-24 22:42:20 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-10-24 22:42:20 +0000 |
commit | ad122198084c3ae789baea6375000012c4dd80ec (patch) | |
tree | c3a6801c1f7cdd1d083e90e7c5bf68557a6108aa | |
parent | 709c8181ca64c6521031fa901fa12763bdcf1d97 (diff) | |
download | extra-cmake-modules-ad122198084c3ae789baea6375000012c4dd80ec.tar.gz extra-cmake-modules-ad122198084c3ae789baea6375000012c4dd80ec.tar.bz2 |
try to fix the automoc problem in kioslave/media/medianotifier
kde4_automoc() absolutely _must_ work without the macro_add_file_dependencies() line.
If it doesn't it's a cmake bug. But since this is the way the dependencies of generated
files are handled everywhere I am at least 99% sure it works in cmake and the mistake must be on my side.
So, I think the problem was that mediamanageriface.cpp was also used from mdeia/medianotifier/ using "../mediamanageriface.cpp".
Then this file was parsed for "include *moc" and probably the correct line was found and added as a property
to the source file using the absolute path. Later on in kde4_add_plugin() the property for the moc
files was retrieved but without using the absolute path, so that's why probably the moc file
wasn't found and so the dependency wasn't created.
CCMAIL: faure@kde.org
David, can you please check and let me know ?
Thanks
Alex
svn path=/trunk/KDE/kdelibs/; revision=598892
-rw-r--r-- | modules/KDE4Macros.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 1aae018c..f44df7a5 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -195,7 +195,7 @@ macro (KDE4_AUTOMOC) # kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${ARGN}) # macro_add_file_dependencies(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_moc}) # else (KDE4_ENABLE_FINAL) - macro_add_file_dependencies(${_abs_FILE} ${_moc}) +# macro_add_file_dependencies(${_abs_FILE} ${_moc}) # endif (KDE4_ENABLE_FINAL) endforeach (_current_MOC_INC) @@ -211,7 +211,8 @@ macro(KDE4_GET_AUTOMOC_FILES _list) set(${_list}) foreach (_current_FILE ${ARGN}) set(_automoc_FILES_PROPERTY) - get_source_file_property(_automoc_FILES_PROPERTY ${_current_FILE} AUTOMOC_FILES) + get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) + get_source_file_property(_automoc_FILES_PROPERTY ${_abs_FILE} AUTOMOC_FILES) if (_automoc_FILES_PROPERTY) foreach (_current_MOC_FILE ${_automoc_FILES_PROPERTY}) list(APPEND ${_list} ${_current_MOC_FILE}) |