CMAKE: moved GNA var setting to proper place; removed find_package when build python...
[platform/upstream/dldt.git] / inference-engine / cmake / InitRHDecoder.cmake.in
1 # Copyright (C) 2018-2019 Intel Corporation
2 #
3 # SPDX-License-Identifier: Apache-2.0
4 #
5
6 # module to locate RHDecoder libraries
7 function (init_rh_decoder)
8     if (NOT IE_MAIN_SOURCE_DIR)
9         set(RH_Decoder ${IE_EXTERNAL_DIR}/@rh_decoder_version@)
10     endif()
11
12     set(RH_LIB_DIR libs/x64)
13     set(RH_LIB decoder_library)
14
15     if (WIN32)
16         set(RH_PLATFORM_DIR windows)
17     elseif (UNIX)
18         set(RH_PLATFORM_DIR linux)
19     else ()
20         message(FATAL_ERROR "RH Decoder not supported on this platform, only linux, and windows")
21     endif ()
22
23     find_library(RH_DECODER_LIBRARY
24             ${RH_LIB}
25             PATH ${RH_Decoder}/${RH_PLATFORM_DIR}/${RH_LIB_DIR}
26             NO_DEFAULT_PATH)
27
28     get_filename_component(cmake_style_path_to_rh "${RH_Decoder}/${RH_PLATFORM_DIR}/include" ABSOLUTE)
29
30     set(libRH_Decoder_INCLUDE_DIRS ${cmake_style_path_to_rh} PARENT_SCOPE)
31     set(libRH_Decoder_LIBRARIES  ${RH_DECODER_LIBRARY} PARENT_SCOPE)
32 endfunction(init_rh_decoder)