Title: [230297] trunk/Source/ThirdParty/libwebrtc
Revision
230297
Author
commit-qu...@webkit.org
Date
2018-04-05 01:00:49 -0700 (Thu, 05 Apr 2018)

Log Message

[GTK] Add CMake package search for vpx and libevent libraries
https://bugs.webkit.org/show_bug.cgi?id=184257

Patch by Alejandro G. Castro <a...@igalia.com> on 2018-04-05
Reviewed by Michael Catanzaro.

Add new cmake search files for libevent, vpx and alsa-lib, this
makes a cleaner detection of the libraries.

* CMakeLists.txt: Use the new cmake find files to detect the
package and add a better error message when the library is not
there.
* Source/cmake/FindAlsaLib.cmake: Added.
* Source/cmake/FindLibEvent.cmake: Added.
* Source/cmake/FindVpx.cmake: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt (230296 => 230297)


--- trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt	2018-04-05 05:00:46 UTC (rev 230296)
+++ trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt	2018-04-05 08:00:49 UTC (rev 230297)
@@ -1,7 +1,21 @@
 
-find_library(VPX_LIBRARY vpx)
-find_library(EVENT_LIBRARY event)
+set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
+find_package(Vpx 1.7.0)
+if (NOT LIBVPX_FOUND)
+    message(FATAL_ERROR "libvpx is needed for USE_LIBWEBRTC.")
+endif ()
+
+find_package(LibEvent)
+if (NOT LIBEVENT_FOUND)
+    message(FATAL_ERROR "libevent is needed for USE_LIBWEBRTC.")
+endif ()
+
+find_package(AlsaLib)
+if (NOT ALSALIB_FOUND)
+    message(FATAL_ERROR "alsa-lib is needed for USE_LIBWEBRTC.")
+endif ()
+
 set(webrtc_SOURCES
     Source/third_party/boringssl/err_data.c
     Source/third_party/boringssl/src/crypto/asn1/a_bitstr.c

Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (230296 => 230297)


--- trunk/Source/ThirdParty/libwebrtc/ChangeLog	2018-04-05 05:00:46 UTC (rev 230296)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog	2018-04-05 08:00:49 UTC (rev 230297)
@@ -1,3 +1,20 @@
+2018-04-05  Alejandro G. Castro  <a...@igalia.com>
+
+        [GTK] Add CMake package search for vpx and libevent libraries
+        https://bugs.webkit.org/show_bug.cgi?id=184257
+
+        Reviewed by Michael Catanzaro.
+
+        Add new cmake search files for libevent, vpx and alsa-lib, this
+        makes a cleaner detection of the libraries.
+
+        * CMakeLists.txt: Use the new cmake find files to detect the
+        package and add a better error message when the library is not
+        there.
+        * Source/cmake/FindAlsaLib.cmake: Added.
+        * Source/cmake/FindLibEvent.cmake: Added.
+        * Source/cmake/FindVpx.cmake: Added.
+
 2018-04-03  Youenn Fablet  <you...@apple.com>
 
         RealtimeOutgoingVideoSourceMac should pass a ObjCFrameBuffer buffer

Added: trunk/Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake (0 => 230297)


--- trunk/Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake	                        (rev 0)
+++ trunk/Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake	2018-04-05 08:00:49 UTC (rev 230297)
@@ -0,0 +1,33 @@
+# - Try to find alsa library.
+# Once done, this will define
+#
+#  ALSALIB_FOUND - system has alsa library.
+#
+# Copyright (C) 2018 Igalia S.L.
+#
+# 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 HOLDER AND ITS 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 HOLDER OR ITS
+# 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.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_ALSALIB alsa)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Alsalib DEFAULT_MSG PC_ALSALIB_VERSION)

Added: trunk/Source/ThirdParty/libwebrtc/cmake/FindLibEvent.cmake (0 => 230297)


--- trunk/Source/ThirdParty/libwebrtc/cmake/FindLibEvent.cmake	                        (rev 0)
+++ trunk/Source/ThirdParty/libwebrtc/cmake/FindLibEvent.cmake	2018-04-05 08:00:49 UTC (rev 230297)
@@ -0,0 +1,46 @@
+# - Try to find libevent.
+# Once done, this will define
+#
+#  LIBEVENT_FOUND - system has libevent.
+#  EVENT_LIBRARY - link this to use libevent.
+#
+# Copyright (C) 2018 Igalia S.L.
+#
+# 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 HOLDER AND ITS 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 HOLDER OR ITS
+# 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.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_LIBEVENT libevent)
+
+find_library(EVENT_LIBRARY
+    NAME event
+    HINTS ${PC_LIBEVENT_LIBDIR}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LibEvent
+    REQUIRED_VARS EVENT_LIBRARY
+    FOUND_VAR LIBEVENT_FOUND
+    VERSION_VAR PC_LIBEVENT_VERSION)
+
+mark_as_advanced(
+    EVENT_LIBRARY
+)

Added: trunk/Source/ThirdParty/libwebrtc/cmake/FindVpx.cmake (0 => 230297)


--- trunk/Source/ThirdParty/libwebrtc/cmake/FindVpx.cmake	                        (rev 0)
+++ trunk/Source/ThirdParty/libwebrtc/cmake/FindVpx.cmake	2018-04-05 08:00:49 UTC (rev 230297)
@@ -0,0 +1,46 @@
+# - Try to find libvpx.
+# Once done, this will define
+#
+#  LIBVPX_FOUND - system has libvpx.
+#  VPX_LIBRARY - link this to use libvpx.
+#
+# Copyright (C) 2018 Igalia S.L.
+#
+# 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 HOLDER AND ITS 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 HOLDER OR ITS
+# 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.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_LIBVPX vpx)
+
+find_library(VPX_LIBRARY
+    NAME vpx
+    HINTS ${PC_LIBVPX_LIBDIR}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LibVpx
+    REQUIRED_VARS VPX_LIBRARY
+    FOUND_VAR LIBVPX_FOUND
+    VERSION_VAR PC_LIBVPX_VERSION)
+
+mark_as_advanced(
+    VPX_LIBRARY
+)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to