Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed build with system level-zero #28241

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/plugins/intel_npu/src/utils/src/zero/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ add_library(openvino::npu_zero_utils ALIAS ${TARGET_NAME})
set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME npu_zero_utils)

add_library(level-zero-headers INTERFACE)
set_property(TARGET level-zero-headers APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR}/thirdparty/level_zero/level-zero/include>)
set_property(TARGET level-zero-headers APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:LevelZero::LevelZero,INTERFACE_INCLUDE_DIRECTORIES>)
add_library(LevelZero::Headers ALIAS level-zero-headers)

target_include_directories(${TARGET_NAME}
Expand All @@ -30,6 +30,7 @@ target_link_libraries(${TARGET_NAME} PUBLIC openvino::runtime::dev)
#
# targets install
#

ov_install_static_lib(${TARGET_NAME} ${NPU_PLUGIN_COMPONENT})

ov_developer_package_export_targets(TARGET openvino::npu_zero_utils
Expand All @@ -41,3 +42,14 @@ ov_install_static_lib(level-zero-ext ${NPU_PLUGIN_COMPONENT})

ov_developer_package_export_targets(TARGET level-zero-headers)
ov_install_static_lib(level-zero-headers ${NPU_PLUGIN_COMPONENT})

if(TARGET ze_loader)
ov_developer_package_export_targets(TARGET ze_loader)
ov_install_static_lib(ze_loader ${NPU_PLUGIN_COMPONENT})
ilya-lavrenov marked this conversation as resolved.
Show resolved Hide resolved

add_dependencies(${TARGET_NAME} ze_loader)

# TODO: remove once https://github.com/oneapi-src/level-zero/pull/243 is merged and made a part of official release
ov_developer_package_export_targets(TARGET utils)
ov_install_static_lib(utils ${NPU_PLUGIN_COMPONENT})
endif()
2 changes: 1 addition & 1 deletion thirdparty/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if(ENABLE_INTEL_NPU)
endif()
endif()

if(NOT libze_loader_FOUND)
if(NOT level_zero_FOUND)
add_subdirectory(thirdparty/level_zero EXCLUDE_FROM_ALL)
add_library(LevelZero::LevelZero ALIAS ze_loader)
endif()
Expand Down
Loading