ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / sh / shaka-packager / 0002-Unvendor-dependencies.patch
blob19abd9ad5a6c2e5941bfcc125c098563336db8e0
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 5b96a2429e..181df0bf2d 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -9,6 +9,8 @@
6 # Minimum CMake version. This must be in the root level CMakeLists.txt.
7 cmake_minimum_required(VERSION 3.24)
9 +set(CMAKE_CXX_STANDARD 17)
11 # These policy settings should be included before the project definition.
12 include("packager/policies.cmake")
14 @@ -28,6 +30,28 @@ enable_testing()
16 option(SKIP_INTEGRATION_TESTS "Skip the packager integration tests" OFF)
18 +find_package(absl REQUIRED)
19 +find_package(MbedTLS REQUIRED)
20 +find_package(GTest REQUIRED)
21 +find_package(CURL REQUIRED)
22 +find_package(LibXml2 REQUIRED)
23 +find_package(PNG REQUIRED)
24 +find_package(nlohmann_json REQUIRED)
25 +find_package(Protobuf CONFIG REQUIRED)
26 +find_package(webm REQUIRED)
28 +# Alias to same names as vendored dependencies
29 +add_library(mbedtls ALIAS MbedTLS::mbedtls)
30 +add_library(gmock ALIAS GTest::gmock)
31 +add_library(gtest ALIAS GTest::gtest)
32 +add_library(gtest_main ALIAS GTest::gtest_main)
33 +add_library(libcurl ALIAS CURL::libcurl)
34 +add_library(LibXml2 ALIAS LibXml2::LibXml2)
35 +add_library(png_static ALIAS PNG::PNG) # not static but the expected library name
36 +add_library(libprotobuf ALIAS protobuf::libprotobuf)
37 +add_executable(protoc ALIAS protobuf::protoc)
38 +add_library(webm ALIAS webm::webm)
40 # Subdirectories with their own CMakeLists.txt
41 add_subdirectory(packager)
42 add_subdirectory(link-test)
43 diff --git a/packager/CMakeLists.txt b/packager/CMakeLists.txt
44 index 7238d243bb..722217bbc4 100644
45 --- a/packager/CMakeLists.txt
46 +++ b/packager/CMakeLists.txt
47 @@ -78,7 +78,6 @@ add_subdirectory(media)
48 add_subdirectory(hls)
49 add_subdirectory(mpd)
50 add_subdirectory(status)
51 -add_subdirectory(third_party)
52 add_subdirectory(tools)
53 add_subdirectory(utils)
54 add_subdirectory(version)
55 diff --git a/packager/tools/pssh/CMakeLists.txt b/packager/tools/pssh/CMakeLists.txt
56 index 9ec3a39d26..0b981cec29 100644
57 --- a/packager/tools/pssh/CMakeLists.txt
58 +++ b/packager/tools/pssh/CMakeLists.txt
59 @@ -14,7 +14,6 @@ set(PSSH_BOX_OUTPUTS
61 add_custom_command(
62 DEPENDS
63 - protobuf_py
64 widevine_protos
65 pssh-box.py
66 OUTPUT ${PSSH_BOX_OUTPUTS}
67 @@ -26,10 +25,6 @@ add_custom_command(
68 ${CMAKE_BINARY_DIR}/packager/media/base/widevine_common_encryption_pb2.py
69 ${CMAKE_BINARY_DIR}/packager/media/base/widevine_pssh_data_pb2.py
70 ${CMAKE_BINARY_DIR}/packager/pssh-box-protos/
71 - COMMAND
72 - ${CMAKE_COMMAND} -E copy_directory
73 - ${CMAKE_BINARY_DIR}/packager/third_party/protobuf/py/google
74 - ${CMAKE_BINARY_DIR}/packager/pssh-box-protos/google
75 COMMAND
76 ${CMAKE_COMMAND} -E copy
77 ${CMAKE_CURRENT_SOURCE_DIR}/pssh-box.py