2023-10-17 19:52:40 +00:00
|
|
|
# Copyright 2023 Google LLC. All rights reserved.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
# https://developers.google.com/open-source/licenses/bsd
|
|
|
|
|
|
|
|
# Copy the pssh-box.py script and its protos into the required directory
|
|
|
|
# structure.
|
|
|
|
set(PSSH_BOX_OUTPUTS
|
2023-11-30 21:17:01 +00:00
|
|
|
${CMAKE_BINARY_DIR}/packager/pssh-box.py
|
|
|
|
${CMAKE_BINARY_DIR}/packager/pssh-box-protos
|
|
|
|
${CMAKE_BINARY_DIR}/packager/pssh-box-protos/widevine_common_encryption_pb2.py
|
|
|
|
${CMAKE_BINARY_DIR}/packager/pssh-box-protos/widevine_pssh_data_pb2.py)
|
2023-10-17 19:52:40 +00:00
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
DEPENDS
|
|
|
|
widevine_protos
|
|
|
|
pssh-box.py
|
|
|
|
OUTPUT ${PSSH_BOX_OUTPUTS}
|
|
|
|
COMMAND
|
|
|
|
${CMAKE_COMMAND} -E make_directory
|
2023-11-30 21:17:01 +00:00
|
|
|
${CMAKE_BINARY_DIR}/packager/pssh-box-protos/
|
2023-10-17 19:52:40 +00:00
|
|
|
COMMAND
|
|
|
|
${CMAKE_COMMAND} -E copy
|
|
|
|
${CMAKE_BINARY_DIR}/packager/media/base/widevine_common_encryption_pb2.py
|
|
|
|
${CMAKE_BINARY_DIR}/packager/media/base/widevine_pssh_data_pb2.py
|
2023-11-30 21:17:01 +00:00
|
|
|
${CMAKE_BINARY_DIR}/packager/pssh-box-protos/
|
2023-10-17 19:52:40 +00:00
|
|
|
COMMAND
|
|
|
|
${CMAKE_COMMAND} -E copy
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/pssh-box.py
|
2023-11-30 21:17:01 +00:00
|
|
|
${CMAKE_BINARY_DIR}/packager/)
|
2023-10-17 19:52:40 +00:00
|
|
|
|
|
|
|
add_custom_target(pssh_box_py ALL DEPENDS ${PSSH_BOX_OUTPUTS})
|