Imported Upstream version 2.8.10.2
[platform/upstream/cmake.git] / Modules / kde3uic.cmake
1
2 #=============================================================================
3 # Copyright 2006-2009 Kitware, Inc.
4 # Copyright 2006 Alexander Neundorf <neundorf@kde.org>
5 #
6 # Distributed under the OSI-approved BSD License (the "License");
7 # see accompanying file Copyright.txt for details.
8 #
9 # This software is distributed WITHOUT ANY WARRANTY; without even the
10 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 # See the License for more information.
12 #=============================================================================
13 # (To distribute this file outside of CMake, substitute the full
14 #  License text for the above reference.)
15
16 # used internally by KDE3Macros.cmake
17 # neundorf@kde.org
18
19
20 execute_process(COMMAND ${KDE_UIC_EXECUTABLE}
21    -L ${KDE_UIC_PLUGIN_DIR} -nounload -tr tr2i18n
22    -impl ${KDE_UIC_H_FILE}
23    ${KDE_UIC_FILE}
24    OUTPUT_VARIABLE _uic_CONTENTS
25    ERROR_QUIET
26   )
27
28 string(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
29 string(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
30
31 file(WRITE ${KDE_UIC_CPP_FILE} "#include <kdialog.h>\n#include <klocale.h>\n\n")
32 file(APPEND ${KDE_UIC_CPP_FILE} "${_uic_CONTENTS}")
33