From 91a240c31c4891ee207f43ac7fa352f2a6e9df50 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Fri, 15 Nov 2024 11:51:25 +0100 Subject: [PATCH] updated imgui_test_engine / cmake configure_imgui_test_engine_with_python_gil() depends only on Python --- .../hello_imgui_test_engine_cmake.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/hello_imgui_test_engine_integration/hello_imgui_test_engine_cmake.cmake b/src/hello_imgui_test_engine_integration/hello_imgui_test_engine_cmake.cmake index 7ce18a48..d8e03ee7 100644 --- a/src/hello_imgui_test_engine_integration/hello_imgui_test_engine_cmake.cmake +++ b/src/hello_imgui_test_engine_integration/hello_imgui_test_engine_cmake.cmake @@ -86,14 +86,8 @@ endfunction() function(configure_imgui_test_engine_with_python_gil) # 1. imgui_test_engine should move the GIL between threads target_compile_definitions(imgui_test_engine PUBLIC IMGUI_TEST_ENGINE_WITH_PYTHON_GIL) - # 2. and for this it needs to link with pybind - if(SKBUILD) - # if building wheel, only add include path to pybind11 and python - target_link_libraries(imgui_test_engine PUBLIC pybind11::pybind11) - else() - # if building an app, link the python interpreter - target_link_libraries(imgui_test_engine PUBLIC pybind11::embed) - endif() + find_package(Python3 COMPONENTS Development) + target_link_libraries(imgui_test_engine PUBLIC Python3::Python) endfunction()