Skip to content

Commit b6cf954

Browse files
committed
rreorganaise components
1 parent 260d913 commit b6cf954

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies = [
2323
cmake.source-dir = "./"
2424
cmake.build-type = "Release"
2525
cmake.targets = ["py_generate_pipeline", "genai"]
26-
install.components = ["core_genai", "pygenai"]
26+
install.components = ["wheel_genai"]
2727
sdist.cmake = true
2828
wheel.packages = ["src/python/openvino_genai"]
2929
wheel.install-dir = "openvino_genai"

src/cpp/CMakeLists.txt

+4-8
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ install(TARGETS ${TARGET_NAME}
7171
LIBRARY DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR}
7272
RUNTIME DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR})
7373

74-
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION . COMPONENT pygenai RUNTIME DESTINATION . COMPONENT pygenai)
75-
7674
# - Windows: `<openvino_dir>\runtime\bin\intel64\Release\`
7775
# - MacOS_x86: `<openvino_dir>/runtime/lib/intel64/Release`
7876
# - MacOS_arm64: `<openvino_dir>/runtime/lib/arm64/Release/`
@@ -94,14 +92,12 @@ endif()
9492
if(MSVC OR APPLE)
9593
set(ARCH_DIR ${ARCH_DIR}/${CMAKE_BUILD_TYPE})
9694
endif()
97-
install(TARGETS ${TARGET_NAME}
98-
LIBRARY DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai
99-
RUNTIME DESTINATION runtime/bin/${ARCH_DIR} COMPONENT core_genai)
10095
install(TARGETS ${TARGET_NAME} EXPORT openvino_genaiTargets
101-
LIBRARY DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai_dev
96+
LIBRARY DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai
10297
ARCHIVE DESTINATION runtime/lib/${ARCH_DIR} COMPONENT core_genai_dev
103-
RUNTIME DESTINATION runtime/bin/${ARCH_DIR} COMPONENT core_genai_dev
104-
INCLUDES DESTINATION runtime/include COMPONENT core_genai_dev)
98+
RUNTIME DESTINATION runtime/bin/${ARCH_DIR} COMPONENT core_genai
99+
NAMELINK_COMPONENT DESTINATION runtime/lib/${ARCH_DIR} COMPONENT HIDDEN
100+
INCLUDES DESTINATION runtime/include)
105101
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION runtime/include COMPONENT core_genai_dev)
106102
install(EXPORT openvino_genaiTargets FILE openvino_genaiTargets.cmake NAMESPACE openvino:: DESTINATION runtime/cmake)
107103
include(CMakePackageConfigHelpers)

src/python/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ endif()
1818
pybind11_add_module(py_generate_pipeline py_generate_pipeline.cpp)
1919
target_link_libraries(py_generate_pipeline PRIVATE genai)
2020

21-
install(TARGETS py_generate_pipeline LIBRARY DESTINATION . COMPONENT pygenai)
2221

2322
# setting RPATH / LC_RPATH depending on platform
2423
if(LINUX)
@@ -47,3 +46,9 @@ add_custom_command(TARGET py_generate_pipeline POST_BUILD
4746
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
4847
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/openvino_genai/ DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR})
4948
install(TARGETS py_generate_pipeline LIBRARY DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR})
49+
50+
if(SKBUILD)
51+
# wheel_genai component is used for wheel generation in pyproject.toml
52+
# Don't even add wheel_genai in other cases to hide it from normal packaging process
53+
install(TARGETS genai py_generate_pipeline LIBRARY DESTINATION . COMPONENT wheel_genai RUNTIME DESTINATION . COMPONENT wheel_genai)
54+
endif()

0 commit comments

Comments
 (0)