|
| 1 | +# If not stated otherwise in this file or this component's license file the |
| 2 | +# following copyright and licenses apply: |
| 3 | +# |
| 4 | +# Copyright 2020 RDK Management |
| 5 | +# |
| 6 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +# you may not use this file except in compliance with the License. |
| 8 | +# You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, software |
| 13 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +# See the License for the specific language governing permissions and |
| 16 | +# limitations under the License. |
| 17 | + |
| 18 | +set(PLUGIN_NAME HdmiInput) |
| 19 | +set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) |
| 20 | + |
| 21 | +set(PLUGIN_HDMIINPUT_STARTUPORDER "" CACHE STRING "To configure startup order of HdmiInput plugin") |
| 22 | + |
| 23 | +find_package(${NAMESPACE}Plugins REQUIRED) |
| 24 | +if (USE_THUNDER_R4) |
| 25 | + find_package(${NAMESPACE}COM REQUIRED) |
| 26 | +else () |
| 27 | + find_package(${NAMESPACE}Protocols REQUIRED) |
| 28 | +endif (USE_THUNDER_R4) |
| 29 | + |
| 30 | +add_library(${MODULE_NAME} SHARED |
| 31 | + HdmiInput.cpp |
| 32 | + Module.cpp |
| 33 | + ) |
| 34 | + |
| 35 | +set_target_properties(${MODULE_NAME} PROPERTIES |
| 36 | + CXX_STANDARD 11 |
| 37 | + CXX_STANDARD_REQUIRED YES) |
| 38 | + |
| 39 | +target_compile_definitions(${MODULE_NAME} PRIVATE MODULE_NAME=Plugin_${PLUGIN_NAME}) |
| 40 | + |
| 41 | +target_include_directories(${MODULE_NAME} PRIVATE ../helpers) |
| 42 | + |
| 43 | +if (USE_THUNDER_R4) |
| 44 | +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM) |
| 45 | +else () |
| 46 | +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}Protocols::${NAMESPACE}Protocols) |
| 47 | +endif (USE_THUNDER_R4) |
| 48 | + |
| 49 | + |
| 50 | +find_package(DS) |
| 51 | +find_package(IARMBus) |
| 52 | + |
| 53 | +target_include_directories(${MODULE_NAME} PRIVATE ${DS_INCLUDE_DIRS}) |
| 54 | +target_include_directories(${MODULE_NAME} PRIVATE ${IARMBUS_INCLUDE_DIRS}) |
| 55 | +target_include_directories(${MODULE_NAME} PRIVATE ../helpers) |
| 56 | + |
| 57 | +set_source_files_properties(HdmiInput.cpp PROPERTIES COMPILE_FLAGS "-fexceptions") |
| 58 | + |
| 59 | +target_link_libraries(${MODULE_NAME} PUBLIC ${NAMESPACE}Plugins::${NAMESPACE}Plugins ${IARMBUS_LIBRARIES} ${DS_LIBRARIES} ) |
| 60 | + |
| 61 | +install(TARGETS ${MODULE_NAME} |
| 62 | + DESTINATION lib/${STORAGE_DIRECTORY}/plugins) |
| 63 | + |
| 64 | +write_config(${PLUGIN_NAME}) |
0 commit comments