diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-03-08 21:57:21 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-03-08 21:57:21 +0000 |
commit | 8f14220ea8b606ca278e1b790aed9908efe330cc (patch) | |
tree | 837817230463f1bfe15b8e3d6f82b1d62ae9453d /modules/KDE3Macros.cmake | |
parent | f4363cbf7f33cb4f448ec09602bcf3f2ba019b77 (diff) | |
download | extra-cmake-modules-8f14220ea8b606ca278e1b790aed9908efe330cc.tar.gz extra-cmake-modules-8f14220ea8b606ca278e1b790aed9908efe330cc.tar.bz2 |
-apply patch by Andreas Beckermann for KDE 3 stuff
-prepare UsePkgconfig for moving to cmake
Alex
svn path=/trunk/KDE/kdelibs/; revision=516854
Diffstat (limited to 'modules/KDE3Macros.cmake')
-rw-r--r-- | modules/KDE3Macros.cmake | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/KDE3Macros.cmake b/modules/KDE3Macros.cmake index eb3f2c01..5924b39d 100644 --- a/modules/KDE3Macros.cmake +++ b/modules/KDE3Macros.cmake @@ -189,13 +189,21 @@ MACRO(KDE3_AUTOMOC) SET(_matching_FILES ) FOREACH (_current_FILE ${ARGN}) - GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + + # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. + # here. this is required to make bouic work correctly: + # we need to add generated .cpp files to the sources (to compile them), + # but we cannot let automoc handle them, as the .cpp files don't exist yet when + # cmake is run for the very first time on them -> however the .cpp files might + # exist at a later run. at that time we need to skip them, so that we don't add two + # different rules for the same moc file + GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC) - IF (EXISTS ${_tmp_FILE}) + IF (EXISTS ${_abs_FILE} AND NOT _skip) - FILE(READ ${_tmp_FILE} _contents) + FILE(READ ${_abs_FILE} _contents) - GET_FILENAME_COMPONENT(_abs_FILE ${_tmp_FILE} ABSOLUTE) GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}") @@ -214,12 +222,12 @@ MACRO(KDE3_AUTOMOC) DEPENDS ${_header} ) - MACRO_ADD_FILE_DEPENDENCIES(${_tmp_FILE} ${_moc}) + MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) ENDFOREACH (_current_MOC_INC) ENDIF(_match) - ENDIF (EXISTS ${_tmp_FILE}) + ENDIF (EXISTS ${_abs_FILE} AND NOT _skip) ENDFOREACH (_current_FILE) ENDMACRO(KDE3_AUTOMOC) |