From 7b2f4f6e4b9ac29e17558cf18f19ec692a962670 Mon Sep 17 00:00:00 2001 From: Mikhail Ryzhov Date: Mon, 20 Nov 2023 18:22:39 +0100 Subject: [PATCH] clean up code --- .../user_ie_extensions/CMakeLists.txt | 11 ++++++----- modules/custom_operations/user_ie_extensions/setup.py | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/custom_operations/user_ie_extensions/CMakeLists.txt b/modules/custom_operations/user_ie_extensions/CMakeLists.txt index 43e5f76d9..2fabfa37d 100644 --- a/modules/custom_operations/user_ie_extensions/CMakeLists.txt +++ b/modules/custom_operations/user_ie_extensions/CMakeLists.txt @@ -19,8 +19,6 @@ endif() include(cmake/platforms.cmake) -include(GNUInstallDirs) - find_package(OpenVINO REQUIRED COMPONENTS Runtime) find_package(TBB COMPONENTS tbb tbbmalloc) find_package(OpenCV COMPONENTS core) @@ -111,12 +109,15 @@ target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime) target_compile_definitions(${TARGET_NAME} PRIVATE ${CUSTOM_OPERATIONS}) target_include_directories(${TARGET_NAME} PUBLIC ./include/) + if(DEFINED SKBUILD) + # Installing the extension module to the root of the package + install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION . ) + if(APPLE) set_target_properties( - ${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path/${CMAKE_INSTALL_LIBDIR}") + ${TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path") else() - set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH - "$ORIGIN") + set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN") endif() endif() diff --git a/modules/custom_operations/user_ie_extensions/setup.py b/modules/custom_operations/user_ie_extensions/setup.py index 6b2702d86..e21163dfb 100644 --- a/modules/custom_operations/user_ie_extensions/setup.py +++ b/modules/custom_operations/user_ie_extensions/setup.py @@ -5,8 +5,8 @@ packages=["ov_tokenizer"], package_dir={"": "src/tokenizer/python"}, cmake_install_dir="src/tokenizer/python/ov_tokenizer/libs", - cmake_args=['-DCUSTOM_OPERATIONS:STRING=tokenizer'], - root_is_pure=True + cmake_args=['-DCUSTOM_OPERATIONS:STRING=tokenizer', + '-DBUILD_FAST_TOKENIZERS=OFF'] ) # When building extension modules `cmake_install_dir` should always be set to the