diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindYtdlp.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/FindYtdlp.cmake b/cmake/FindYtdlp.cmake new file mode 100644 index 0000000..a1d779d --- /dev/null +++ b/cmake/FindYtdlp.cmake @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: 2021 Jonah BrĂ¼chert <jbb@kaidan.im> +# +# SPDX-License-Identifier: BSD-2-Clause + +find_package(Python3 REQUIRED COMPONENTS Interpreter) + +execute_process(COMMAND ${Python3_EXECUTABLE} -c "import yt_dlp" RESULT_VARIABLE YTDLP_CHECK_RESULT) + +if (${YTDLP_CHECK_RESULT} EQUAL 0) + set(Ytdlp_FOUND TRUE) +endif() |