summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-01-06 08:35:16 -0500
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-30 08:31:27 +0100
commita416082d7b2d28813ff3855a61945ba109af522d (patch)
tree7de76afe2396cac1c5501036157c6b687f3d7f28
parent38c2411fa82975ba41039ea583c46aeb4b4cde61 (diff)
Add configure test and build system files for JasPer.
Change-Id: Id3db7c5e7b3329adbea62c9d95323ead4e8a783f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--config.tests/jasper/jasper.cpp53
-rw-r--r--config.tests/jasper/jasper.pro6
-rw-r--r--qtimageformats.pro1
-rw-r--r--src/3rdparty/jasper.pri65
4 files changed, 125 insertions, 0 deletions
diff --git a/config.tests/jasper/jasper.cpp b/config.tests/jasper/jasper.cpp
new file mode 100644
index 0000000..92e0276
--- /dev/null
+++ b/config.tests/jasper/jasper.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Petroules Corporation.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the config.tests in the Qt ImageFormats module.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <string.h>
+#include <jasper/jasper.h>
+
+int main(int, char **)
+{
+ // This version of Jasper is broken, according to the old Qt Solutions docs
+ if (strcmp(JAS_VERSION, "1.900.0") == 0)
+ return 1;
+
+ return 0;
+}
diff --git a/config.tests/jasper/jasper.pro b/config.tests/jasper/jasper.pro
new file mode 100644
index 0000000..77d3689
--- /dev/null
+++ b/config.tests/jasper/jasper.pro
@@ -0,0 +1,6 @@
+SOURCES = jasper.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+win32:CONFIG += console
+msvc: LIBS += libjasper.lib
+else: LIBS += -ljasper
diff --git a/qtimageformats.pro b/qtimageformats.pro
index 26f5354..659e508 100644
--- a/qtimageformats.pro
+++ b/qtimageformats.pro
@@ -1,6 +1,7 @@
requires(qtHaveModule(gui))
load(configure)
+qtCompileTest(jasper)
qtCompileTest(libmng)
qtCompileTest(libtiff)
diff --git a/src/3rdparty/jasper.pri b/src/3rdparty/jasper.pri
new file mode 100644
index 0000000..ec9f99f
--- /dev/null
+++ b/src/3rdparty/jasper.pri
@@ -0,0 +1,65 @@
+msvc: DEFINES += JAS_WIN_MSVC_BUILD
+INCLUDEPATH += $$PWD/jasper/src/libjasper/include $$PWD/libjasper/include
+SOURCES += \
+ $$PWD/jasper/src/libjasper/base/jas_cm.c \
+ $$PWD/jasper/src/libjasper/base/jas_debug.c \
+ $$PWD/jasper/src/libjasper/base/jas_getopt.c \
+ $$PWD/jasper/src/libjasper/base/jas_icc.c \
+ $$PWD/jasper/src/libjasper/base/jas_iccdata.c \
+ $$PWD/jasper/src/libjasper/base/jas_image.c \
+ $$PWD/jasper/src/libjasper/base/jas_init.c \
+ $$PWD/jasper/src/libjasper/base/jas_malloc.c \
+ $$PWD/jasper/src/libjasper/base/jas_seq.c \
+ $$PWD/jasper/src/libjasper/base/jas_stream.c \
+ $$PWD/jasper/src/libjasper/base/jas_string.c \
+ $$PWD/jasper/src/libjasper/base/jas_tmr.c \
+ $$PWD/jasper/src/libjasper/base/jas_tvp.c \
+ $$PWD/jasper/src/libjasper/base/jas_version.c \
+ $$PWD/jasper/src/libjasper/bmp/bmp_cod.c \
+ $$PWD/jasper/src/libjasper/bmp/bmp_dec.c \
+ $$PWD/jasper/src/libjasper/bmp/bmp_enc.c \
+ $$PWD/jasper/src/libjasper/dummy.c \
+ $$PWD/jasper/src/libjasper/jp2/jp2_cod.c \
+ $$PWD/jasper/src/libjasper/jp2/jp2_dec.c \
+ $$PWD/jasper/src/libjasper/jp2/jp2_enc.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_bs.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_cs.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_dec.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_enc.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_math.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_mct.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_mqcod.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_mqdec.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_mqenc.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_qmfb.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_t1cod.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_t1dec.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_t1enc.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_t2cod.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_t2dec.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_t2enc.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_tagtree.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_tsfb.c \
+ $$PWD/jasper/src/libjasper/jpc/jpc_util.c \
+ $$PWD/jasper/src/libjasper/jpg/jpg_val.c \
+ $$PWD/jasper/src/libjasper/mif/mif_cod.c \
+ $$PWD/jasper/src/libjasper/pgx/pgx_cod.c \
+ $$PWD/jasper/src/libjasper/pgx/pgx_dec.c \
+ $$PWD/jasper/src/libjasper/pgx/pgx_enc.c \
+ $$PWD/jasper/src/libjasper/pnm/pnm_cod.c \
+ $$PWD/jasper/src/libjasper/pnm/pnm_dec.c \
+ $$PWD/jasper/src/libjasper/pnm/pnm_enc.c \
+ $$PWD/jasper/src/libjasper/ras/ras_cod.c \
+ $$PWD/jasper/src/libjasper/ras/ras_dec.c \
+ $$PWD/jasper/src/libjasper/ras/ras_enc.c
+
+LIBJPEG_DEP = $$PWD/../../../qtbase/src/3rdparty/libjpeg.pri
+exists($${LIBJPEG_DEP}) {
+ include($${LIBJPEG_DEP})
+ SOURCES += \
+ $$PWD/jasper/src/libjasper/jpg/jpg_dec.c \
+ $$PWD/jasper/src/libjasper/jpg/jpg_enc.c
+} else {
+ SOURCES += \
+ $$PWD/jasper/src/libjasper/jpg/jpg_dummy.c
+}