Работа со старыми версиями pybind

This commit is contained in:
Andrei Astafev 2022-11-07 13:40:55 +03:00
parent 515eeb4b11
commit 29baa9cce3

View File

@ -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 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/thirdparty/sapr>)
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()