From 29baa9cce3bfe99efba11186e7242b75b02dc2cf Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 7 Nov 2022 13:40:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D1=81?= =?UTF-8?q?=D0=BE=20=D1=81=D1=82=D0=B0=D1=80=D1=8B=D0=BC=D0=B8=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D1=8F=D0=BC=D0=B8=20pybind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyxCMake/lib/AddSaprBlock.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MyxCMake/lib/AddSaprBlock.cmake b/MyxCMake/lib/AddSaprBlock.cmake index 3bf97a5..860a224 100644 --- a/MyxCMake/lib/AddSaprBlock.cmake +++ b/MyxCMake/lib/AddSaprBlock.cmake @@ -59,6 +59,10 @@ function(myx_add_sapr_block TARGET_NAME) target_include_directories(${TARGET_NAME} PRIVATE ${pybind11_INCLUDE_DIR}) target_include_directories(${TARGET_NAME} PUBLIC $) - target_link_libraries(${TARGET_NAME} PRIVATE pybind11::headers pybind11::pybind11) + if(pybind11_VERSION VERSION_LESS "2.5.0") + target_link_libraries(${TARGET_NAME} PRIVATE pybind11::module) + else() + target_link_libraries(${TARGET_NAME} PRIVATE pybind11::headers pybind11::pybind11) + endif() endif() endfunction()