Skip to content

Commit

Permalink
Added more exclude markers for install rules (openvinotoolkit#21561)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored Dec 11, 2023
1 parent 9e2bd77 commit 02dec1c
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 29 deletions.
1 change: 1 addition & 0 deletions cmake/developer_package/frontends/frontends.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ macro(ov_add_frontend)
install(DIRECTORY ${${TARGET_NAME}_INCLUDE_DIR}/openvino
DESTINATION ${FRONTEND_INSTALL_INCLUDE}
COMPONENT ${dev_component}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL}
FILES_MATCHING PATTERN "*.hpp")

# public target name
Expand Down
3 changes: 0 additions & 3 deletions cmake/developer_package/plugins/plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ function(ov_add_plugin)
install(TARGETS ${OV_PLUGIN_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR}
COMPONENT ${install_component})
install(TARGETS ${OV_PLUGIN_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR}
COMPONENT ${install_component})
else()
ov_install_static_lib(${OV_PLUGIN_NAME} ${OV_CPACK_COMP_CORE})
endif()
Expand Down
14 changes: 8 additions & 6 deletions src/bindings/c/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,19 @@ ov_cpack_add_component(${OV_CPACK_COMP_CORE_C} HIDDEN)
ov_cpack_add_component(${OV_CPACK_COMP_CORE_C_DEV} HIDDEN)

install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets
RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${OV_CPACK_COMP_CORE_C}
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE_C}
LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${OV_CPACK_COMP_CORE_C}
NAMELINK_COMPONENT ${OV_CPACK_COMP_CORE_C_DEV}
RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${OV_CPACK_COMP_CORE_C} ${OV_CPACK_COMP_CORE_C_EXCLUDE_ALL}
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE_C} ${OV_CPACK_COMP_CORE_C_EXCLUDE_ALL}
LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${OV_CPACK_COMP_CORE_C} ${OV_CPACK_COMP_CORE_C_EXCLUDE_ALL}
NAMELINK_COMPONENT ${OV_CPACK_COMP_CORE_C_DEV} ${OV_CPACK_COMP_CORE_C_DEV_EXCLUDE_ALL}
INCLUDES DESTINATION ${OV_CPACK_INCLUDEDIR}
${OV_CPACK_INCLUDEDIR}/ie)

install(DIRECTORY ${OpenVINO_C_API_SOURCE_DIR}/include/c_api
DESTINATION ${OV_CPACK_INCLUDEDIR}/ie
COMPONENT ${OV_CPACK_COMP_CORE_C_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_C_DEV}
${OV_CPACK_COMP_CORE_C_DEV_EXCLUDE_ALL})

install(DIRECTORY ${OpenVINO_C_API_SOURCE_DIR}/include/openvino/
DESTINATION ${OV_CPACK_INCLUDEDIR}/openvino
COMPONENT ${OV_CPACK_COMP_CORE_C_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_C_DEV}
${OV_CPACK_COMP_CORE_C_DEV_EXCLUDE_ALL})
23 changes: 14 additions & 9 deletions src/cmake/openvino.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ export(TARGETS ${TARGET_NAME} NAMESPACE openvino::
APPEND FILE "${CMAKE_BINARY_DIR}/OpenVINOTargets.cmake")

install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets
RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${OV_CPACK_COMP_CORE}
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE}
LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${OV_CPACK_COMP_CORE}
NAMELINK_COMPONENT ${OV_CPACK_COMP_CORE_DEV}
RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${OV_CPACK_COMP_CORE} ${OV_CPACK_COMP_CORE_EXCLUDE_ALL}
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE} ${OV_CPACK_COMP_CORE_EXCLUDE_ALL}
LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${OV_CPACK_COMP_CORE} ${OV_CPACK_COMP_CORE_EXCLUDE_ALL}
NAMELINK_COMPONENT ${OV_CPACK_COMP_CORE_DEV} ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL}
INCLUDES DESTINATION ${OV_CPACK_INCLUDEDIR}
${OV_CPACK_INCLUDEDIR}/ie)

Expand Down Expand Up @@ -147,7 +147,8 @@ ov_cpack_add_component(${OV_CPACK_COMP_CORE_DEV}
if(ENABLE_PLUGINS_XML)
install(FILES $<TARGET_FILE_DIR:${TARGET_NAME}>/plugins.xml
DESTINATION ${OV_CPACK_PLUGINSDIR}
COMPONENT ${OV_CPACK_COMP_CORE})
COMPONENT ${OV_CPACK_COMP_CORE}
${OV_CPACK_COMP_CORE_EXCLUDE_ALL})

if(ENABLE_TESTS)
# for InferenceEngineUnitTest
Expand All @@ -164,7 +165,8 @@ install(EXPORT OpenVINOTargets
FILE OpenVINOTargets.cmake
NAMESPACE openvino::
DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})

# build tree

Expand Down Expand Up @@ -227,12 +229,14 @@ configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cm
install(FILES "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake"
"${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake"
DESTINATION ${OV_CPACK_IE_CMAKEDIR}
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})

install(FILES "${CMAKE_BINARY_DIR}/share/OpenVINOConfig.cmake"
"${CMAKE_BINARY_DIR}/OpenVINOConfig-version.cmake"
DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})

#
# Generate and install openvino.pc pkg-config file
Expand Down Expand Up @@ -313,5 +317,6 @@ if(ENABLE_PKGCONFIG_GEN)

install(FILES "${pkgconfig_out}"
DESTINATION "${OV_CPACK_RUNTIMEDIR}/pkgconfig"
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
endif()
3 changes: 2 additions & 1 deletion src/common/preprocessing/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ ov_developer_package_export_targets(TARGET ${TARGET_NAME})

if(BUILD_SHARED_LIBS)
install(TARGETS ${TARGET_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR} COMPONENT ${OV_CPACK_COMP_CORE})
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR} COMPONENT ${OV_CPACK_COMP_CORE}
${OV_CPACK_COMP_CORE_EXCLUDE_ALL})
else()
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
endif()
4 changes: 3 additions & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ target_include_directories(ngraph INTERFACE $<BUILD_INTERFACE:${OV_CORE_INCLUDE_
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
DESTINATION ${OV_CPACK_INCLUDEDIR}
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL}
FILES_MATCHING
PATTERN "*.hpp"
PATTERN "*.h")
Expand All @@ -169,4 +170,5 @@ write_basic_package_version_file(${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake
install(FILES ${CMAKE_BINARY_DIR}/ngraphConfig.cmake
${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake
DESTINATION ${OV_CPACK_NGRAPH_CMAKEDIR}
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
3 changes: 2 additions & 1 deletion src/frontends/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}_obj

install(DIRECTORY ${FRONTEND_INCLUDE_DIR}/openvino
DESTINATION ${FRONTEND_INSTALL_INCLUDE}
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})

# Shutdown protobuf library
if(Protobuf_IN_FRONTEND AND BUILD_SHARED_LIBS)
Expand Down
3 changes: 2 additions & 1 deletion src/frontends/onnx/frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/onnx_import
DESTINATION ${FRONTEND_INSTALL_INCLUDE}/ngraph/frontend
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
3 changes: 2 additions & 1 deletion src/inference/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ ov_install_static_lib(${TARGET_NAME}_plugin_api ${OV_CPACK_COMP_CORE})

install(DIRECTORY "${PUBLIC_HEADERS_DIR}/"
DESTINATION ${OV_CPACK_INCLUDEDIR}
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})

if(ENABLE_TESTS)
add_subdirectory(tests)
Expand Down
6 changes: 4 additions & 2 deletions src/plugins/intel_cpu/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ function(ov_add_onednn)
# but for this we need to install library files
install(FILES $<TARGET_PROPERTY:arm_compute::arm_compute,IMPORTED_LOCATION>
DESTINATION ${OV_CPACK_ARCHIVEDIR}
COMPONENT ${OV_CPACK_COMP_CORE})
COMPONENT ${OV_CPACK_COMP_CORE}
${OV_CPACK_COMP_CORE_EXCLUDE_ALL})
install(FILES "${intel_cpu_thirdparty_SOURCE_DIR}/ACLConfig.cmake"
DESTINATION ${OV_CPACK_OPENVINO_CMAKEDIR}
COMPONENT ${OV_CPACK_COMP_CORE_DEV})
COMPONENT ${OV_CPACK_COMP_CORE_DEV}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
endif()
endfunction()

Expand Down
8 changes: 5 additions & 3 deletions src/plugins/intel_gna/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if(BUILD_SHARED_LIBS)
set(gna_component gna)
else()
# during static build all plugins are part of the core, thus the dependencies as well
set(gna_component core)
set(gna_component ${OV_CPACK_COMP_CORE})
endif()

file(GLOB_RECURSE gna_libraries "${libGNA_LIBRARIES_BASE_PATH}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
Expand Down Expand Up @@ -125,14 +125,16 @@ if(NOT BUILD_SHARED_LIBS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/libGNAConfig.cmake ${CMAKE_BINARY_DIR} COPYONLY)
install(FILES "${CMAKE_BINARY_DIR}/libGNAConfig.cmake"
DESTINATION ${OV_CPACK_IE_CMAKEDIR}
COMPONENT ${gna_component})
COMPONENT ${gna_component}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})

# install .lib file on Windows
if(WIN32)
file(GLOB_RECURSE gna_libraries "${libGNA_LIBRARIES_BASE_PATH}/*${CMAKE_STATIC_LIBRARY_SUFFIX}")
install(FILES ${gna_libraries}
DESTINATION ${OV_CPACK_LIBRARYDIR}
COMPONENT ${gna_component})
COMPONENT ${gna_component}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL})
endif()
endif()

Expand Down
3 changes: 2 additions & 1 deletion thirdparty/onnx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ if(NOT ENABLE_SYSTEM_PROTOBUF AND NOT BUILD_SHARED_LIBS)
endif()

install(TARGETS ${protobuf_target_name} EXPORT ONNXTargets
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE})
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE}
${OV_CPACK_COMP_CORE_EXCLUDE_ALL})
endif()

0 comments on commit 02dec1c

Please sign in to comment.