From 20e39e0376f20593c2fc5bbf1fa03a64a9e93b22 Mon Sep 17 00:00:00 2001 From: melpon Date: Mon, 10 Jun 2024 13:51:21 +0900 Subject: [PATCH] =?UTF-8?q?stub=20=E3=81=AE=E3=81=A8=E3=81=93=E3=82=8D?= =?UTF-8?q?=E3=82=82=E5=9B=B2=E3=81=BE=E3=81=AA=E3=81=84=E3=81=A8=E3=81=84?= =?UTF-8?q?=E3=81=91=E3=81=AA=E3=81=95=E3=81=9D=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc9d9ccf..6c8cfd4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,14 +84,16 @@ nanobind_add_module( src/sora_video_source.cpp ) -nanobind_add_stub( - sora_sdk_ext_stub - MODULE sora_sdk_ext - OUTPUT sora_sdk_ext.pyi - PYTHON_PATH $ - DEPENDS sora_sdk_ext - MARKER_FILE py.typed -) +if (SORA_GEN_PYI) + nanobind_add_stub( + sora_sdk_ext_stub + MODULE sora_sdk_ext + OUTPUT sora_sdk_ext.pyi + PYTHON_PATH $ + DEPENDS sora_sdk_ext + MARKER_FILE py.typed + ) +endif() set_target_properties(sora_sdk_ext PROPERTIES CXX_STANDARD 20 C_STANDARD 20) set_target_properties(sora_sdk_ext PROPERTIES POSITION_INDEPENDENT_CODE ON)