CMake installation rules for 3rd party components (#2944)

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* Add CMake install rules for OpenVINO 3rd party dependencies

Remove unwanted targets from final distribution (test, static libs, etc)

* remove duplicated targets from install

align GNA Windows install path with Linux

* Add COMPONENT install name for OMP

remove empty lines

* Add OMP to CPack components

* remove gtest from deliverables

add explicitly clDNN_unit_tests target to build

* set clDNN_unit_tests properties only by condition

* remove install commands for clDNN

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
This commit is contained in:
Sergey Lyubimtsev 2020-11-30 12:29:30 +03:00 committed by GitHub
parent fb1b03752d
commit e12b24a0bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 28 additions and 32 deletions

View File

@ -75,8 +75,8 @@ RUN make -j $(nproc) install
# Run tests via tox # Run tests via tox
WORKDIR /openvino/ngraph/python WORKDIR /openvino/ngraph/python
ENV NGRAPH_CPP_BUILD_PATH=/openvino/dist ENV NGRAPH_CPP_BUILD_PATH=/openvino/dist/deployment_tools/ngraph
ENV LD_LIBRARY_PATH=/openvino/dist/lib ENV LD_LIBRARY_PATH=/openvino/dist/deployment_tools/ngraph/lib
ENV NGRAPH_ONNX_IMPORT_ENABLE=TRUE ENV NGRAPH_ONNX_IMPORT_ENABLE=TRUE
ENV PYTHONPATH=/openvino/bin/intel64/Release/lib/python_api/python3.8:${PYTHONPATH} ENV PYTHONPATH=/openvino/bin/intel64/Release/lib/python_api/python3.8:${PYTHONPATH}
RUN git clone --recursive https://github.com/pybind/pybind11.git -b v2.5.0 --depth 1 RUN git clone --recursive https://github.com/pybind/pybind11.git -b v2.5.0 --depth 1

View File

@ -114,7 +114,7 @@ function(build_ngraph)
ie_cpack_add_component(ngraph) ie_cpack_add_component(ngraph)
set(SDL_cmake_included ON) set(SDL_cmake_included ON)
# set(NGRAPH_COMPONENT_PREFIX "deployment_tools/ngraph/") set(NGRAPH_COMPONENT_PREFIX "deployment_tools/ngraph/")
add_subdirectory(ngraph) add_subdirectory(ngraph)
set(NGRAPH_LIBRARIES ngraph PARENT_SCOPE) set(NGRAPH_LIBRARIES ngraph PARENT_SCOPE)
endfunction() endfunction()

View File

@ -126,6 +126,13 @@ if (THREADING STREQUAL "OMP")
update_deps_cache(OMP "${OMP}" "Path to OMP root folder") update_deps_cache(OMP "${OMP}" "Path to OMP root folder")
log_rpath_from_dir(OMP "${OMP}/lib") log_rpath_from_dir(OMP "${OMP}/lib")
debug_message(STATUS "intel_omp=" ${OMP}) debug_message(STATUS "intel_omp=" ${OMP})
ie_cpack_add_component(omp)
file(GLOB_RECURSE source_list "${OMP}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
install(FILES ${source_list}
DESTINATION "deployment_tools/inference_engine/external/omp/lib"
COMPONENT omp)
endif () endif ()
## TBB package ## TBB package

View File

@ -121,7 +121,7 @@ set (BUILD_TESTING OFF)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags")
function(add_gflags) function(add_gflags)
set(BUILD_SHARED_LIBS OFF) set(BUILD_SHARED_LIBS OFF)
add_subdirectory(thirdparty/gflags) add_subdirectory(thirdparty/gflags EXCLUDE_FROM_ALL)
set_target_properties(gflags_nothreads_static PROPERTIES FOLDER thirdparty) set_target_properties(gflags_nothreads_static PROPERTIES FOLDER thirdparty)
endfunction() endfunction()
add_gflags() add_gflags()

View File

@ -69,6 +69,7 @@ set_target_properties(${TARGET_NAME} ${TARGET_NAME}_test_static
# install # install
install(FILES "${GNA_KERNEL_LIBRARY}" file(GLOB_RECURSE source_list "${libGNA_LIBRARIES_BASE_PATH}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
install(FILES ${source_list}
DESTINATION ${IE_CPACK_IE_DIR}/external/gna/lib DESTINATION ${IE_CPACK_IE_DIR}/external/gna/lib
COMPONENT gna) COMPONENT gna)

View File

@ -15,7 +15,7 @@ function(add_gtest_libraries)
endif () endif ()
set(BUILD_SHARED_LIBS OFF) set(BUILD_SHARED_LIBS OFF)
add_subdirectory(gtest) add_subdirectory(gtest EXCLUDE_FROM_ALL)
get_target_property(gtest_include_dirs gtest INTERFACE_INCLUDE_DIRECTORIES) get_target_property(gtest_include_dirs gtest INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(gtest PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${gtest_include_dirs}") set_target_properties(gtest PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${gtest_include_dirs}")

View File

@ -50,7 +50,7 @@ function(ie_build_pugixml)
set(BUILD_TESTS_current ${BUILD_TESTS}) set(BUILD_TESTS_current ${BUILD_TESTS})
set(BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE) set(BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE)
set(BUILD_SHARED_LIBS OFF) set(BUILD_SHARED_LIBS OFF)
add_subdirectory(pugixml) add_subdirectory(pugixml EXCLUDE_FROM_ALL)
set(BUILD_TESTS ${BUILD_TESTS_current} CACHE BOOL "Build tests" FORCE) set(BUILD_TESTS ${BUILD_TESTS_current} CACHE BOOL "Build tests" FORCE)
endfunction() endfunction()
@ -63,7 +63,7 @@ else()
endif() endif()
add_subdirectory(stb_lib) add_subdirectory(stb_lib)
add_subdirectory(ade) add_subdirectory(ade EXCLUDE_FROM_ALL)
add_subdirectory(fluid/modules/gapi) add_subdirectory(fluid/modules/gapi)
set_target_properties(ade fluid stb_image PROPERTIES FOLDER thirdparty) set_target_properties(ade fluid stb_image PROPERTIES FOLDER thirdparty)

View File

@ -172,20 +172,3 @@ elseif((NOT ANDROID) AND (UNIX))
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE pthread) target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE pthread)
endif() endif()
target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE ${CLDNN__SYSTEM_LINK_LIBRARIES}) target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE ${CLDNN__SYSTEM_LINK_LIBRARIES})
# ========================================== Installation ==============================================
# API headers.
install(DIRECTORY "${CLDNN__API_DIR}/"
DESTINATION "include/clDNN"
FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
# Binaries.
install(TARGETS "${CLDNN_BUILD__PROJ}"
ARCHIVE DESTINATION "lib"
LIBRARY DESTINATION "lib"
RUNTIME DESTINATION "bin"
INCLUDES DESTINATION "include/clDNN"
)
# ======================================================================================================

View File

@ -2,8 +2,7 @@
The Compile tool is a C++ application that enables you to dump a loaded executable network blob. The Compile tool is a C++ application that enables you to dump a loaded executable network blob.
The tool is delivered as an executable file that can be run on both Linux\* and Windows\*. The tool is delivered as an executable file that can be run on both Linux\* and Windows\*.
The tool is located in the `<INSTALLROOT>/deployment_tools/inference_engine/lib/intel64/` directory on Linux The tool is located in the `<INSTALLROOT>/deployment_tools/tools/compile_tool` directory.
and `<INSTALL_DIR\deployment_tools\inference_engine\bin\intel64\Release>` on Windows.
The workflow of the Compile tool is as follows: The workflow of the Compile tool is as follows:

View File

@ -38,7 +38,13 @@ set "PATH=%INTEL_OPENVINO_DIR%\deployment_tools\model_optimizer;%PATH%"
:: Inference Engine :: Inference Engine
set "InferenceEngine_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\share" set "InferenceEngine_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\share"
set "HDDL_INSTALL_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\external\hddl" set "HDDL_INSTALL_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\external\hddl"
set "PATH=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\external\tbb\bin;%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\Release;%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\Debug;%HDDL_INSTALL_DIR%\bin;%PATH%" set "OPENMP_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\external\omp\lib"
set "GNA_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\external\gna\lib"
set "PATH=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\external\tbb\bin;%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\Release;%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\Debug;%HDDL_INSTALL_DIR%\bin;%OPENMP_DIR%;%GNA_DIR%;%PATH%"
if exist %INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\arch_descriptions (
set ARCH_ROOT_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\arch_descriptions
)
if exist %INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\arch_descriptions ( if exist %INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\arch_descriptions (
set ARCH_ROOT_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\arch_descriptions set ARCH_ROOT_DIR=%INTEL_OPENVINO_DIR%\deployment_tools\inference_engine\bin\intel64\arch_descriptions
) )

View File

@ -51,10 +51,10 @@ if [ -e "$INSTALLDIR/deployment_tools/inference_engine" ]; then
export HDDL_INSTALL_DIR=$INSTALLDIR/deployment_tools/inference_engine/external/hddl export HDDL_INSTALL_DIR=$INSTALLDIR/deployment_tools/inference_engine/external/hddl
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
export DYLD_LIBRARY_PATH=$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_mac/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${DYLD_LIBRARY_PATH:+:DYLD_LIBRARY_PATH} export DYLD_LIBRARY_PATH=$INSTALLDIR/deployment_tools/inference_engine/external/omp/lib:$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_mac/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${DYLD_LIBRARY_PATH:+:DYLD_LIBRARY_PATH}
export LD_LIBRARY_PATH=$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_mac/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH=$INSTALLDIR/deployment_tools/inference_engine/external/omp/lib:$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_mac/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
else else
export LD_LIBRARY_PATH=$HDDL_INSTALL_DIR/lib:$INSTALLDIR/deployment_tools/inference_engine/external/gna/lib:$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_lnx/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH=$HDDL_INSTALL_DIR/lib:$INSTALLDIR/deployment_tools/inference_engine/external/omp/lib:$INSTALLDIR/deployment_tools/inference_engine/external/gna/lib:$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_lnx/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
fi fi
HDDL_UNITE_DIR=$INSTALLDIR/deployment_tools/inference_engine/external/hddl_unite HDDL_UNITE_DIR=$INSTALLDIR/deployment_tools/inference_engine/external/hddl_unite