Warning, /frameworks/kdelibs4support/src/kde4uic.cmake is written in an unsupported language. File is not indexed.

0001 
0002 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
0003 #
0004 # Redistribution and use is allowed according to the terms of the BSD license.
0005 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0006 
0007 #using a ui3 file with uic3
0008 if (KDE3_IMPL)
0009 
0010   EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
0011     -nounload -tr tr2i18n
0012     -impl ${KDE_UIC_H_FILE}
0013     ${KDE_UIC_FILE}
0014     OUTPUT_VARIABLE _uic_CONTENTS
0015     ERROR_QUIET
0016   )
0017 endif (KDE3_IMPL)
0018 
0019 
0020 if (KDE3_HEADER)
0021 
0022   EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
0023     -nounload -tr tr2i18n
0024     ${KDE_UIC_FILE}
0025     OUTPUT_VARIABLE _uic_CONTENTS
0026     ERROR_QUIET
0027   )
0028    set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE})
0029 endif (KDE3_HEADER)
0030 
0031 # the kde4 branch
0032 if (KDE4_HEADER)
0033 
0034   EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
0035     -tr tr2i18n
0036     ${KDE_UIC_FILE}
0037     OUTPUT_VARIABLE _uic_CONTENTS
0038   )
0039 
0040    set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE})
0041 endif (KDE4_HEADER)
0042 
0043 
0044 IF (_uic_CONTENTS)
0045   #replace tr218n("") with QString::null to avoid warning from KLocale
0046   STRING(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
0047   STRING(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
0048   #replace image15_data with img15_filename to make enable_final work
0049   STRING(REGEX REPLACE "image([0-9]+)_data" "img\\1_${KDE_UIC_BASENAME}" _uic_CONTENTS "${_uic_CONTENTS}")
0050   #fixup include guard
0051   STRING(REGEX REPLACE "#ifndef " "#ifndef UI_" _uic_CONTENTS "${_uic_CONTENTS}")
0052   STRING(REGEX REPLACE "#define " "#define UI_" _uic_CONTENTS "${_uic_CONTENTS}")
0053 
0054   FILE(WRITE ${KDE_UIC_CPP_FILE} "#include <klocalizedstring.h>\n\n${_uic_CONTENTS}\n")
0055 ENDIF()
0056