aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2023-03-15 14:10:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-03-15 14:10:04 +0000
commit2e193428ef15044a87e19d542c7c43444571935e (patch)
treec5cfd7aa06dcd0d00ef7af0d47cca3d18e8d9d0d
parent2af6fccde4662a7e9790a833ef4b3d6bcc906e19 (diff)
parent6940d04cab6f66b3338d7ffbff8de26da8766e9d (diff)
downloadwebrtc-emu-34-dev.tar.gz
Merge "Updated libyuv cmake files" into emu-master-devnetsim-devemu-prebuiltsemu-devemu-34-releaseemu-34-devemu-33-devaosp-emu-34-dev
-rw-r--r--third_party/libyuv/CMakeLists.txt28
-rw-r--r--third_party/libyuv/LICENSE.YUV29
2 files changed, 47 insertions, 10 deletions
diff --git a/third_party/libyuv/CMakeLists.txt b/third_party/libyuv/CMakeLists.txt
index 94bdfe0af6..b2d6bcd559 100644
--- a/third_party/libyuv/CMakeLists.txt
+++ b/third_party/libyuv/CMakeLists.txt
@@ -1,6 +1,6 @@
# CMakeLists for libyuv
-# Originally created for "roxlu build system" to compile libyuv on windows
-# Run with -DTEST=ON to build unit tests
+# Originally created for "roxlu build system" to compile libyuv on windows Run
+# with -DTEST=ON to build unit tests
project(YUV C CXX) # "C" is required even for C++ projects
set(ly_base_dir ${PROJECT_SOURCE_DIR})
set(ly_src_dir ${ly_base_dir}/source)
@@ -16,15 +16,23 @@ list(SORT ly_source_files)
file(GLOB_RECURSE ly_unittest_sources ${ly_tst_dir}/*.cc)
list(SORT ly_unittest_sources)
-add_library(${ly_lib_static} STATIC ${ly_source_files})
+android_add_library(
+ TARGET ${ly_lib_static}
+ LICENSE "BSD-3-Clause"
+ LIBNAME "libyuv"
+ REPO "${CMAKE_CURRENT_LIST_DIR}"
+ NOTICE "REPO/NOTICE.YUV"
+ URL
+ "https://android.googlesource.com/platform/https://android.googlesource.com/platform/external/webrtc/+/refs/heads/emu-master-dev/third_party/libyuv/"
+ SRC ${ly_source_files})
target_include_directories(${ly_lib_static} PUBLIC ${ly_inc_dir})
-if (NOT WINDOWS_MSVC_X86_64)
- add_executable(libyuv_unittest ${ly_unittest_sources})
- target_link_libraries(libyuv_unittest ${ly_lib_name} gtest_main
- Threads::Threads)
-endif()
+# if (NOT WINDOWS_MSVC_X86_64)
+android_add_test( TARGET libyuv_unittest SRC ${ly_unittest_sources})
+target_link_libraries(libyuv_unittest PRIVATE ${ly_lib_name} gtest_main
+ Threads::Threads)
+# endif()
-if (LINUX_AARCH64)
- target_compile_definitions(${ly_lib_name} PRIVATE LIBYUV_DISABLE_NEON=1)
+if(LINUX_AARCH64)
+ target_compile_definitions(${ly_lib_name} PRIVATE LIBYUV_DISABLE_NEON=1)
endif()
diff --git a/third_party/libyuv/LICENSE.YUV b/third_party/libyuv/LICENSE.YUV
new file mode 100644
index 0000000000..da40b336cd
--- /dev/null
+++ b/third_party/libyuv/LICENSE.YUV
@@ -0,0 +1,29 @@
+Copyright (c) 2011, Google Inc. All rights reserved.
+
+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 Google 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
+HOLDER 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.