Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
mryzhov committed Nov 20, 2023
1 parent 372819e commit 7b2f4f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions modules/custom_operations/user_ie_extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
4 changes: 2 additions & 2 deletions modules/custom_operations/user_ie_extensions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b2f4f6

Please sign in to comment.