From 6c2d2613ad90b4f2981c20320a23240f6901158f Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Sat, 27 Oct 2018 22:40:33 +0300 Subject: [PATCH] Use FindPython3 cmake module to launch codegen_scheme --- CMakeLists.txt | 1 + Telegram/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a41808742..e170ea596 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,7 @@ find_package(ZLIB REQUIRED) find_package(FFmpeg REQUIRED) find_package(Opus REQUIRED) find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED) +find_package(Python3 REQUIRED) if (NOT SWSCALE_FOUND) message(FATAL_ERROR "FFmpeg swscale is required") diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 8b31a6613..767f0df52 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -103,7 +103,7 @@ add_custom_command( scheme.cpp scheme.h COMMAND - python ${CMAKE_CURRENT_SOURCE_DIR}/SourceFiles/codegen/scheme/codegen_scheme.py + ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/SourceFiles/codegen/scheme/codegen_scheme.py -o${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Resources/scheme.tl WORKING_DIRECTORY . DEPENDS