Files
openvino/samples/CMakeLists.txt
Ilya Lavrenov 6ca47b074d Library versions & made tests relocatable (#12416)
* Fixes for cases when TBB_DIR env var is set

* Don't use make in build_samples.sh script

* First version of Windows installer

* WIndows NSIS installer

* Improved version of debian packages

* Improvements

* Improvements

* Debian packages now look good

* Library versioning

* Fixed tests to run against debian packages

* Fixed frontend tests

* Fixed code style

* FIxed Windows

* Fixed python tests

* Fixed paths in tests

* fdvfdv

* Fixes

* USe versioning only for debian packages

* Relocatable tests

* Fixed

* Fixed all tests

* Fixed clang-format

* Fixed more tests

* Fixed some tests

* Absolute paths in .ci

* Fixes

* Added support of OpenCV 3.4

* Trying to fix gnaUnitTests
2022-08-08 13:59:24 +04:00

79 lines
2.2 KiB
CMake

# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
add_subdirectory(cpp)
add_subdirectory(c)
# used by tests_deprecated
if(TARGET format_reader)
install(TARGETS format_reader
RUNTIME DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL
LIBRARY DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL)
endif()
openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader ie_samples_utils)
#
# Install
#
# install C++ samples
ie_cpack_add_component(${OV_CPACK_COMP_CPP_SAMPLES}
HIDDEN
DEPENDS ${OV_CPACK_COMP_CORE_DEV})
if(UNIX)
install(DIRECTORY cpp/
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES}
PATTERN *.bat EXCLUDE
PATTERN *.sh EXCLUDE
PATTERN .clang-format EXCLUDE)
install(PROGRAMS cpp/build_samples.sh
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES})
elseif(WIN32)
install(DIRECTORY cpp/
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES}
PATTERN *.sh EXCLUDE
PATTERN .clang-format EXCLUDE)
endif()
# install C samples
ie_cpack_add_component(${OV_CPACK_COMP_C_SAMPLES}
HIDDEN
DEPENDS ${OV_CPACK_COMP_CORE_C_DEV})
if(UNIX)
install(PROGRAMS cpp/build_samples.sh
DESTINATION ${OV_CPACK_SAMPLESDIR}/c
COMPONENT ${OV_CPACK_COMP_C_SAMPLES})
elseif(WIN32)
install(PROGRAMS cpp/build_samples_msvc.bat
DESTINATION ${OV_CPACK_SAMPLESDIR}/c
COMPONENT ${OV_CPACK_COMP_C_SAMPLES})
endif()
install(DIRECTORY c
DESTINATION ${OV_CPACK_SAMPLESDIR}
COMPONENT ${OV_CPACK_COMP_C_SAMPLES}
PATTERN c/CMakeLists.txt EXCLUDE
PATTERN c/.clang-format EXCLUDE)
install(FILES cpp/CMakeLists.txt
DESTINATION ${OV_CPACK_SAMPLESDIR}/c
COMPONENT ${OV_CPACK_COMP_C_SAMPLES})
# install Python samples
ie_cpack_add_component(${OV_CPACK_COMP_PYTHON_SAMPLES} HIDDEN)
install(DIRECTORY python/
DESTINATION ${OV_CPACK_SAMPLESDIR}/python
COMPONENT ${OV_CPACK_COMP_PYTHON_SAMPLES})