Title: [110045] trunk
Revision
110045
Author
[email protected]
Date
2012-03-07 03:54:19 -0800 (Wed, 07 Mar 2012)

Log Message

[Qt] Add qmake config tests for JPEG and PNG library
https://bugs.webkit.org/show_bug.cgi?id=80398

Source/WebCore:

Reviewed by Tor Arne Vestbø.

Add JPEG and PNG library tests to config.tests and
add error() abort to WebCore.pri if tests don't work.

* WebCore.pri:

Tools:

Add JPEG and PNG library tests to config.tests and
add error() abort to WebCore.pri if tests don't work.

Reviewed by Tor Arne Vestbø.

* qmake/config.tests/libjpeg/libjpeg.cpp: Added.
(main):
* qmake/config.tests/libjpeg/libjpeg.pro: Added.
* qmake/config.tests/libpng/libpng.cpp: Added.
(main):
* qmake/config.tests/libpng/libpng.pro: Added.
* qmake/sync.profile:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110044 => 110045)


--- trunk/Source/WebCore/ChangeLog	2012-03-07 11:30:29 UTC (rev 110044)
+++ trunk/Source/WebCore/ChangeLog	2012-03-07 11:54:19 UTC (rev 110045)
@@ -1,3 +1,15 @@
+2012-03-07  Zoltan Horvath  <[email protected]>
+
+        [Qt] Add qmake config tests for JPEG and PNG library
+        https://bugs.webkit.org/show_bug.cgi?id=80398
+
+        Reviewed by Tor Arne Vestbø.
+
+        Add JPEG and PNG library tests to config.tests and
+        add error() abort to WebCore.pri if tests don't work.
+
+        * WebCore.pri:
+
 2012-03-06  Pavel Podivilov  <[email protected]>
 
         Web Inspector: extract source mapping logic from DebuggerPresentationModel to ScriptMappingImpl.

Modified: trunk/Source/WebCore/WebCore.pri (110044 => 110045)


--- trunk/Source/WebCore/WebCore.pri	2012-03-07 11:30:29 UTC (rev 110044)
+++ trunk/Source/WebCore/WebCore.pri	2012-03-07 11:54:19 UTC (rev 110045)
@@ -217,6 +217,12 @@
         $$SOURCE_DIR/platform/image-decoders/jpeg \
         $$SOURCE_DIR/platform/image-decoders/png
 
+    haveQt(5) {
+        # Qt5 allows us to use config tests to check for the presence of these libraries
+        !contains(config_test_libjpeg, yes): error("JPEG library not found!")
+        !contains(config_test_libpng, yes): error("PNG 1.2 library not found!")
+    }
+
     LIBS += -ljpeg -lpng12
 
     contains(DEFINES, WTF_USE_WEBP=1) {

Modified: trunk/Tools/ChangeLog (110044 => 110045)


--- trunk/Tools/ChangeLog	2012-03-07 11:30:29 UTC (rev 110044)
+++ trunk/Tools/ChangeLog	2012-03-07 11:54:19 UTC (rev 110045)
@@ -1,3 +1,21 @@
+2012-03-07  Zoltan Horvath  <[email protected]>
+
+        [Qt] Add qmake config tests for JPEG and PNG library
+        https://bugs.webkit.org/show_bug.cgi?id=80398
+
+        Add JPEG and PNG library tests to config.tests and
+        add error() abort to WebCore.pri if tests don't work.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * qmake/config.tests/libjpeg/libjpeg.cpp: Added.
+        (main):
+        * qmake/config.tests/libjpeg/libjpeg.pro: Added.
+        * qmake/config.tests/libpng/libpng.cpp: Added.
+        (main):
+        * qmake/config.tests/libpng/libpng.pro: Added.
+        * qmake/sync.profile:
+
 2012-03-07  Byungwoo Lee  <[email protected]>
 
         [EFL] Build warning: Fix warn_unused_result warnings.

Added: trunk/Tools/qmake/config.tests/libjpeg/libjpeg.cpp (0 => 110045)


--- trunk/Tools/qmake/config.tests/libjpeg/libjpeg.cpp	                        (rev 0)
+++ trunk/Tools/qmake/config.tests/libjpeg/libjpeg.cpp	2012-03-07 11:54:19 UTC (rev 110045)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) Zoltan Horvath ([email protected]) 2012 University of Szeged.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
+ */
+
+#include <stdio.h>
+#include <jpeglib.h>
+
+int main(int, char**)
+{
+    struct jpeg_compress_struct cinfo;
+    jpeg_create_compress(&cinfo);
+
+    return 0;
+}

Added: trunk/Tools/qmake/config.tests/libjpeg/libjpeg.pro (0 => 110045)


--- trunk/Tools/qmake/config.tests/libjpeg/libjpeg.pro	                        (rev 0)
+++ trunk/Tools/qmake/config.tests/libjpeg/libjpeg.pro	2012-03-07 11:54:19 UTC (rev 110045)
@@ -0,0 +1,3 @@
+SOURCES = libjpeg.cpp
+OBJECTS_DIR = obj
+LIBS += -ljpeg

Added: trunk/Tools/qmake/config.tests/libpng/libpng.cpp (0 => 110045)


--- trunk/Tools/qmake/config.tests/libpng/libpng.cpp	                        (rev 0)
+++ trunk/Tools/qmake/config.tests/libpng/libpng.cpp	2012-03-07 11:54:19 UTC (rev 110045)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) Zoltan Horvath ([email protected]) 2012 University of Szeged.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * 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.
+ */
+
+#include <png.h>
+
+int main(int, char**)
+{
+    png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
+
+    return 0;
+}

Added: trunk/Tools/qmake/config.tests/libpng/libpng.pro (0 => 110045)


--- trunk/Tools/qmake/config.tests/libpng/libpng.pro	                        (rev 0)
+++ trunk/Tools/qmake/config.tests/libpng/libpng.pro	2012-03-07 11:54:19 UTC (rev 110045)
@@ -0,0 +1,3 @@
+SOURCES = libpng.cpp
+OBJECTS_DIR = obj
+LIBS += -lpng12

Modified: trunk/Tools/qmake/sync.profile (110044 => 110045)


--- trunk/Tools/qmake/sync.profile	2012-03-07 11:30:29 UTC (rev 110044)
+++ trunk/Tools/qmake/sync.profile	2012-03-07 11:54:19 UTC (rev 110045)
@@ -2,4 +2,6 @@
 %configtests = (
     fontconfig => {},
     gccdepends => {},
+    libpng => {},
+    libjpeg => {},
 );
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to