aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2009-09-01 18:16:08 +0000
committerDavid Faure <faure@kde.org>2009-09-01 18:16:08 +0000
commit3cc6b30ab7aa839b5b51e287fd21e0c9382d6fe9 (patch)
tree1485ce2e3317951cea6c62edc1394439c4d04124 /modules
parentd9e84253aa0deb8db2c90d7e0d829cc7cbed163a (diff)
downloadextra-cmake-modules-3cc6b30ab7aa839b5b51e287fd21e0c9382d6fe9.tar.gz
extra-cmake-modules-3cc6b30ab7aa839b5b51e287fd21e0c9382d6fe9.tar.bz2
Forwardport improvements of uic error-handling
svn path=/trunk/KDE/kdelibs/; revision=1018468
Diffstat (limited to 'modules')
-rw-r--r--modules/kde4uic.cmake21
1 files changed, 11 insertions, 10 deletions
diff --git a/modules/kde4uic.cmake b/modules/kde4uic.cmake
index 0e2a33c9..92dd500c 100644
--- a/modules/kde4uic.cmake
+++ b/modules/kde4uic.cmake
@@ -35,21 +35,22 @@ if (KDE4_HEADER)
-tr tr2i18n
${KDE_UIC_FILE}
OUTPUT_VARIABLE _uic_CONTENTS
- ERROR_QUIET
)
set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE})
endif (KDE4_HEADER)
-#replace tr218n("") with QString::null to avoid warning from KLocale
-STRING(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
-STRING(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
-#replace image15_data with img15_filename to make enable_final work
-STRING(REGEX REPLACE "image([0-9]+)_data" "img\\1_${KDE_UIC_BASENAME}" _uic_CONTENTS "${_uic_CONTENTS}")
-#fixup include guard
-STRING(REGEX REPLACE "#ifndef " "#ifndef UI_" _uic_CONTENTS "${_uic_CONTENTS}")
-STRING(REGEX REPLACE "#define " "#define UI_" _uic_CONTENTS "${_uic_CONTENTS}")
+IF (${_uic_CONTENTS})
+ #replace tr218n("") with QString::null to avoid warning from KLocale
+ STRING(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
+ STRING(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
+ #replace image15_data with img15_filename to make enable_final work
+ STRING(REGEX REPLACE "image([0-9]+)_data" "img\\1_${KDE_UIC_BASENAME}" _uic_CONTENTS "${_uic_CONTENTS}")
+ #fixup include guard
+ STRING(REGEX REPLACE "#ifndef " "#ifndef UI_" _uic_CONTENTS "${_uic_CONTENTS}")
+ STRING(REGEX REPLACE "#define " "#define UI_" _uic_CONTENTS "${_uic_CONTENTS}")
-FILE(WRITE ${KDE_UIC_CPP_FILE} "#include <kdialog.h>\n#include <klocale.h>\n\n${_uic_CONTENTS}\n")
+ FILE(WRITE ${KDE_UIC_CPP_FILE} "#include <kdialog.h>\n#include <klocale.h>\n\n${_uic_CONTENTS}\n")
+ENDIF()