[CMake] Eleminate mismatches between Find* module names and variables they set
authorannulen@yandex.ru <annulen@yandex.ru@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Mar 2020 18:10:58 +0000 (18:10 +0000)
committerannulen@yandex.ru <annulen@yandex.ru@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Mar 2020 18:10:58 +0000 (18:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=208948

Reviewed by Michael Catanzaro.

.:

* Source/cmake/FindLibseccomp.cmake:
* Source/cmake/FindWPEBackend_fdo.cmake: Renamed from Source/cmake/FindWPEBackend-fdo.cmake.
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/ThirdParty/libwebrtc:

* CMakeLists.txt:
* cmake/FindAlsaLib.cmake:
* cmake/FindLibEvent.cmake:
* cmake/FindLibOpus.cmake: Renamed from Source/ThirdParty/libwebrtc/cmake/FindOpus.cmake.
* cmake/FindLibVpx.cmake: Renamed from Source/ThirdParty/libwebrtc/cmake/FindVpx.cmake.

Tools:

* wpe/backends/CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@258412 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
ChangeLog
Source/ThirdParty/libwebrtc/CMakeLists.txt
Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake
Source/ThirdParty/libwebrtc/cmake/FindLibEvent.cmake
Source/ThirdParty/libwebrtc/cmake/FindLibOpus.cmake [moved from Source/ThirdParty/libwebrtc/cmake/FindOpus.cmake with 93% similarity]
Source/ThirdParty/libwebrtc/cmake/FindLibVpx.cmake [moved from Source/ThirdParty/libwebrtc/cmake/FindVpx.cmake with 93% similarity]
Source/cmake/FindLibseccomp.cmake
Source/cmake/FindWPEBackend_fdo.cmake [moved from Source/cmake/FindWPEBackend-fdo.cmake with 91% similarity]
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsWPE.cmake
Tools/ChangeLog
Tools/wpe/backends/CMakeLists.txt

index d4a843a..334fdad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2020-03-13  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [CMake] Eleminate mismatches between Find* module names and variables they set
+        https://bugs.webkit.org/show_bug.cgi?id=208948
+
+        Reviewed by Michael Catanzaro.
+
+        * Source/cmake/FindLibseccomp.cmake:
+        * Source/cmake/FindWPEBackend_fdo.cmake: Renamed from Source/cmake/FindWPEBackend-fdo.cmake.
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+
 2020-03-12  Konstantin Tokarev  <annulen@yandex.ru>
 
         [CMake] Find modules should find pkg-config with find_package(PkgConfig QUIET)
index 5c791aa..465ad51 100644 (file)
@@ -1,7 +1,7 @@
 
 set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
-find_package(Vpx 1.7.0)
+find_package(LibVpx 1.7.0)
 if (NOT LIBVPX_FOUND)
     message(FATAL_ERROR "libvpx is needed for USE_LIBWEBRTC.")
 endif ()
@@ -16,7 +16,7 @@ if (NOT ALSALIB_FOUND)
     message(FATAL_ERROR "alsa-lib is needed for USE_LIBWEBRTC.")
 endif ()
 
-find_package(Opus 1.3)
+find_package(LibOpus 1.3)
 if (NOT LIBOPUS_FOUND)
     message(FATAL_ERROR "libopus is needed for USE_LIBWEBRTC.")
 endif ()
@@ -1551,11 +1551,11 @@ target_include_directories(webrtc PRIVATE
     Source/webrtc/modules/audio_coding/codecs/isac/main/include
 )
 
-target_link_libraries(webrtc ${VPX_LIBRARY})
+target_link_libraries(webrtc ${LIBVPX_LIBRARY})
 
-target_link_libraries(webrtc ${EVENT_LIBRARY})
+target_link_libraries(webrtc ${LIBEVENT_LIBRARY})
 
-target_link_libraries(webrtc ${OPUS_LIBRARY})
+target_link_libraries(webrtc ${LIBOPUS_LIBRARY})
 
 # libsrtp package compilation
 set(libsrtp_SOURCES
index e3d885e..b2cb55c 100644 (file)
@@ -1,3 +1,16 @@
+2020-03-13  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [CMake] Eleminate mismatches between Find* module names and variables they set
+        https://bugs.webkit.org/show_bug.cgi?id=208948
+
+        Reviewed by Michael Catanzaro.
+
+        * CMakeLists.txt:
+        * cmake/FindAlsaLib.cmake:
+        * cmake/FindLibEvent.cmake:
+        * cmake/FindLibOpus.cmake: Renamed from Source/ThirdParty/libwebrtc/cmake/FindOpus.cmake.
+        * cmake/FindLibVpx.cmake: Renamed from Source/ThirdParty/libwebrtc/cmake/FindVpx.cmake.
+
 2020-03-02  Alan Coon  <alancoon@apple.com>
 
         Add new Mac target numbers
index 0a2ad22..a6cd56d 100644 (file)
@@ -30,4 +30,4 @@ find_package(PkgConfig)
 pkg_check_modules(PC_ALSALIB alsa)
 
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Alsalib DEFAULT_MSG PC_ALSALIB_VERSION)
+find_package_handle_standard_args(AlsaLib DEFAULT_MSG PC_ALSALIB_VERSION)
index c202854..ebcff80 100644 (file)
@@ -2,7 +2,7 @@
 # Once done, this will define
 #
 #  LIBEVENT_FOUND - system has libevent.
-#  EVENT_LIBRARY - link this to use libevent.
+#  LIBEVENT_LIBRARY - link this to use libevent.
 #
 # Copyright (C) 2018 Igalia S.L.
 #
 find_package(PkgConfig)
 pkg_check_modules(PC_LIBEVENT libevent)
 
-find_library(EVENT_LIBRARY
+find_library(LIBEVENT_LIBRARY
     NAME event
     HINTS ${PC_LIBEVENT_LIBDIR}
 )
 
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(LibEvent
-    REQUIRED_VARS EVENT_LIBRARY
+    REQUIRED_VARS LIBEVENT_LIBRARY
     FOUND_VAR LIBEVENT_FOUND
     VERSION_VAR PC_LIBEVENT_VERSION)
 
 mark_as_advanced(
-    EVENT_LIBRARY
+    LIBEVENT_LIBRARY
 )
@@ -2,7 +2,7 @@
 # Once done, this will define
 #
 #  LIBOPUS_FOUND - system has opus.
-#  OPUS_LIBRARY - link this to use opus.
+#  LIBOPUS_LIBRARY - link this to use opus.
 #
 # Copyright (C) 2018 Igalia S.L.
 #
 find_package(PkgConfig)
 pkg_check_modules(PC_LIBOPUS opus)
 
-find_library(OPUS_LIBRARY
+find_library(LIBOPUS_LIBRARY
     NAME opus
     HINTS ${PC_LIBOPUS_LIBDIR}
 )
 
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(LibOpus
-    REQUIRED_VARS OPUS_LIBRARY
+    REQUIRED_VARS LIBOPUS_LIBRARY
     FOUND_VAR LIBOPUS_FOUND
     VERSION_VAR PC_LIBOPUS_VERSION)
 
 mark_as_advanced(
-    OPUS_LIBRARY
+    LIBOPUS_LIBRARY
 )
@@ -2,7 +2,7 @@
 # Once done, this will define
 #
 #  LIBVPX_FOUND - system has libvpx.
-#  VPX_LIBRARY - link this to use libvpx.
+#  LIBVPX_LIBRARY - link this to use libvpx.
 #
 # Copyright (C) 2018 Igalia S.L.
 #
 find_package(PkgConfig)
 pkg_check_modules(PC_LIBVPX vpx)
 
-find_library(VPX_LIBRARY
+find_library(LIBVPX_LIBRARY
     NAME vpx
     HINTS ${PC_LIBVPX_LIBDIR}
 )
 
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(LibVpx
-    REQUIRED_VARS VPX_LIBRARY
+    REQUIRED_VARS LIBVPX_LIBRARY
     FOUND_VAR LIBVPX_FOUND
     VERSION_VAR PC_LIBVPX_VERSION)
 
 mark_as_advanced(
-    VPX_LIBRARY
+    LIBVPX_LIBRARY
 )
index 66ed2d4..a2f119a 100644 (file)
@@ -42,7 +42,7 @@ find_library(LIBSECCOMP_LIBRARIES
 )
 
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LIBSECCOMP
+find_package_handle_standard_args(Libseccomp
     REQUIRED_VARS LIBSECCOMP_LIBRARIES
     FOUND_VAR LIBSECCOMP_FOUND
     VERSION_VAR PC_LIBSECCOMP_VERSION)
similarity index 91%
rename from Source/cmake/FindWPEBackend-fdo.cmake
rename to Source/cmake/FindWPEBackend_fdo.cmake
index accb7bf..d701df5 100644 (file)
@@ -44,4 +44,7 @@ find_library(WPEBACKEND_FDO_LIBRARIES
 mark_as_advanced(WPEBACKEND_FDO_INCLUDE_DIRS WPEBACKEND_FDO_LIBRARIES)
 
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WPEBACKEND_FDO REQUIRED_VARS WPEBACKEND_FDO_INCLUDE_DIRS WPEBACKEND_FDO_LIBRARIES)
+find_package_handle_standard_args(WPEBackend_fdo
+    REQUIRED_VARS WPEBACKEND_FDO_INCLUDE_DIRS WPEBACKEND_FDO_LIBRARIES
+    FOUND_VAR WPEBACKEND_FDO_FOUND
+    VERSION_VAR PC_WPEBACKEND_FDO_VERSION)
index d88133c..5cb2ec1 100644 (file)
@@ -218,7 +218,7 @@ if (USE_WPE_RENDERER)
         message(FATAL_ERROR "libwpe is required for USE_WPE_RENDERER")
     endif ()
 
-    find_package(WPEBackend-fdo 1.3.1)
+    find_package(WPEBackend_fdo 1.3.1)
     if (NOT WPEBACKEND_FDO_FOUND)
         message(FATAL_ERROR "WPEBackend-fdo is required for USE_WPE_RENDERER")
     endif ()
index d3e08c8..dff6491 100644 (file)
@@ -168,7 +168,7 @@ if (ENABLE_WPE_QT_API)
 endif ()
 
 if (ENABLE_WPE_QT_API OR USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF)
-    find_package(WPEBackend-fdo 1.5.0 REQUIRED)
+    find_package(WPEBackend_fdo 1.5.0 REQUIRED)
 endif ()
 
 add_definitions(-DBUILDING_WPE__=1)
index 2a765b1..fe20b21 100644 (file)
@@ -1,3 +1,12 @@
+2020-03-13  Konstantin Tokarev  <annulen@yandex.ru>
+
+        [CMake] Eleminate mismatches between Find* module names and variables they set
+        https://bugs.webkit.org/show_bug.cgi?id=208948
+
+        Reviewed by Michael Catanzaro.
+
+        * wpe/backends/CMakeLists.txt:
+
 2020-03-13  Aakash Jain  <aakash_jain@apple.com>
 
         [ews-app] reduce logging
index 6456f44..f0f80b3 100644 (file)
@@ -1,7 +1,7 @@
 find_package(Libxkbcommon 0.4.0 REQUIRED)
 find_package(Wayland REQUIRED)
 find_package(WaylandProtocols 1.12 REQUIRED)
-find_package(WPEBackend-fdo 1.3.0 REQUIRED)
+find_package(WPEBackend_fdo 1.3.0 REQUIRED)
 
 set(DERIVED_SOURCES_WPETOOLINGBACKENDS_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WPEToolingBackends")