Advertisement
tasuku

Untitled

Jan 11th, 2014
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.07 KB | None | 0 0
  1. commit 4a630b3ae42e87c07d9a44cfb19a55ac99a56be6
  2. Author: Tasuku Suzuki <stasuku@gmail.com>
  3. Date:   Sun Jan 12 02:18:46 2014 +0900
  4.  
  5.     WIP: add icu compile test
  6.    
  7.     this is a workaround.
  8.     contains(QT_CONFIG,icu) should be used
  9.  
  10. diff --git a/config.tests/icu/icu.cpp b/config.tests/icu/icu.cpp
  11. new file mode 100644
  12. index 0000000..f79dea5
  13. --- /dev/null
  14. +++ b/config.tests/icu/icu.cpp
  15. @@ -0,0 +1,54 @@
  16. +/****************************************************************************
  17. +**
  18. +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
  19. +** Contact: http://www.qt-project.org/legal
  20. +**
  21. +** This file is part of the config.tests of the Qt Toolkit.
  22. +**
  23. +** $QT_BEGIN_LICENSE:LGPL$
  24. +** Commercial License Usage
  25. +** Licensees holding valid commercial Qt licenses may use this file in
  26. +** accordance with the commercial license agreement provided with the
  27. +** Software or, alternatively, in accordance with the terms contained in
  28. +** a written agreement between you and Digia.  For licensing terms and
  29. +** conditions see http://qt.digia.com/licensing.  For further information
  30. +** use the contact form at http://qt.digia.com/contact-us.
  31. +**
  32. +** GNU Lesser General Public License Usage
  33. +** Alternatively, this file may be used under the terms of the GNU Lesser
  34. +** General Public License version 2.1 as published by the Free Software
  35. +** Foundation and appearing in the file LICENSE.LGPL included in the
  36. +** packaging of this file.  Please review the following information to
  37. +** ensure the GNU Lesser General Public License version 2.1 requirements
  38. +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  39. +**
  40. +** In addition, as a special exception, Digia gives you certain additional
  41. +** rights.  These rights are described in the Digia Qt LGPL Exception
  42. +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
  43. +**
  44. +** GNU General Public License Usage
  45. +** Alternatively, this file may be used under the terms of the GNU
  46. +** General Public License version 3.0 as published by the Free Software
  47. +** Foundation and appearing in the file LICENSE.GPL included in the
  48. +** packaging of this file.  Please review the following information to
  49. +** ensure the GNU General Public License version 3.0 requirements will be
  50. +** met: http://www.gnu.org/copyleft/gpl.html.
  51. +**
  52. +**
  53. +** $QT_END_LICENSE$
  54. +**
  55. +****************************************************************************/
  56. +
  57. +#include <unicode/utypes.h>
  58. +#include <unicode/ucol.h>
  59. +#include <unicode/ustring.h>
  60. +
  61. +int main(int, char **)
  62. +{
  63. +    UErrorCode status = U_ZERO_ERROR;
  64. +    UCollator *collator = ucol_open("ru_RU", &status);
  65. +    if (U_FAILURE(status))
  66. +        return 0;
  67. +    ucol_close(collator);
  68. +    return 0;
  69. +}
  70. diff --git a/config.tests/icu/icu.pro b/config.tests/icu/icu.pro
  71. new file mode 100644
  72. index 0000000..2c1b431
  73. --- /dev/null
  74. +++ b/config.tests/icu/icu.pro
  75. @@ -0,0 +1,16 @@
  76. +SOURCES = icu.cpp
  77. +CONFIG += console
  78. +CONFIG -= qt dylib
  79. +win32 {
  80. +    CONFIG(static, static|shared) {
  81. +        CONFIG(debug, debug|release) {
  82. +            LIBS += -lsicuind -lsicuucd -lsicudtd
  83. +        } else {
  84. +            LIBS += -lsicuin -lsicuuc -lsicudt
  85. +        }
  86. +    } else {
  87. +        LIBS += -licuin -licuuc
  88. +    }
  89. +} else {
  90. +    LIBS += -licui18n -licuuc
  91. +}
  92. diff --git a/messagingframework.pro b/messagingframework.pro
  93. index 7c9ca9f..6db65ef 100644
  94. --- a/messagingframework.pro
  95. +++ b/messagingframework.pro
  96. @@ -1,6 +1,9 @@
  97.  TEMPLATE = subdirs
  98.  SUBDIRS = src tests
  99.  
  100. +load(configure)
  101. +qtCompileTest(icu)
  102. +
  103.  tests.depends = src
  104.  
  105.  !contains(DEFINES,QMF_NO_MESSAGE_SERVICE_EDITOR) {
  106. diff --git a/src/libraries/qmfclient/qmfclient.pro b/src/libraries/qmfclient/qmfclient.pro
  107. index 39c34bb..e01bfca 100644
  108. --- a/src/libraries/qmfclient/qmfclient.pro
  109. +++ b/src/libraries/qmfclient/qmfclient.pro
  110. @@ -184,7 +184,7 @@ unix: {
  111.     QMAKE_PKGCONFIG_DESTDIR = pkgconfig
  112.  }
  113.  
  114. -packagesExist(icu-uc) {
  115. +config_icu {
  116.      LIBS += -licui18n -licuuc -licudata
  117.      PRIVATE_HEADERS += support/qcharsetdetector_p.h \
  118.                         support/qcharsetdetector.h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement