diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2012-03-11 13:05:08 +0100 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2012-03-12 12:00:28 +0100 |
commit | 36df41bb337028064a6e12eecc0e310f1027dd7c (patch) | |
tree | ec8800b41e166980dbd81050a6657b65cfdc9668 /config.tests | |
parent | 68e266b3f93fbf7f918a519f8e9198429ff1db07 (diff) |
Make the module not depend on QtBase configure
This is convenient if we want to reconfigure without reconfiguring
QtBase.
Change-Id: I719ba0d89905287a557e962ed6d804514e44b7f5
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'config.tests')
-rw-r--r-- | config.tests/xkbcommon/main.cpp | 58 | ||||
-rw-r--r-- | config.tests/xkbcommon/xkbcommon.pro | 17 |
2 files changed, 75 insertions, 0 deletions
diff --git a/config.tests/xkbcommon/main.cpp b/config.tests/xkbcommon/main.cpp new file mode 100644 index 000000000..9f10f3ea9 --- /dev/null +++ b/config.tests/xkbcommon/main.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the Qt Compositor. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/extensions/XKBcommon.h> +#include <X11/keysym.h> + +#include <QtCore/qnamespace.h> + +int main(int argc, char **argv) +{ + struct xkb_rule_names names; + names.rules = "evdev"; + names.model = "pc105"; + names.layout = "us"; + names.variant = ""; + names.options = ""; + + struct xkb_desc *xkb = xkb_compile_keymap_from_rules(&names); + Q_UNUSED(xkb); + return 0; +} diff --git a/config.tests/xkbcommon/xkbcommon.pro b/config.tests/xkbcommon/xkbcommon.pro new file mode 100644 index 000000000..facc28e58 --- /dev/null +++ b/config.tests/xkbcommon/xkbcommon.pro @@ -0,0 +1,17 @@ +TEMPLATE = app +TARGET = xkbcommon +QT = core +DEPENDPATH += . +INCLUDEPATH += . + +!contains(QT_CONFIG, no-pkg-config) { + QMAKE_CFLAGS_XKBCOMMON=$$system(pkg-config --cflags xkbcommon 2>/dev/null) + QMAKE_LIBS_XKBCOMMON=$$system(pkg-config --libs xkbcommon 2>/dev/null) +} + +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON +QMAKE_CFLAGS += $$QMAKE_CFLAGS_XKBCOMMON +LIBS += $$QMAKE_LIBS_XKBCOMMON + +# Input +SOURCES += main.cpp |