kde3uic.cmake 1.2 KB

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