summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindAML.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /cmake/modules/FindAML.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'cmake/modules/FindAML.cmake')
-rw-r--r--cmake/modules/FindAML.cmake35
1 files changed, 35 insertions, 0 deletions
diff --git a/cmake/modules/FindAML.cmake b/cmake/modules/FindAML.cmake
new file mode 100644
index 0000000..5b9a859
--- /dev/null
+++ b/cmake/modules/FindAML.cmake
@@ -0,0 +1,35 @@
1#.rst:
2# FindAML
3# -------
4# Finds the AML codec
5#
6# This will will define the following variables::
7#
8# AML_FOUND - system has AML
9# AML_INCLUDE_DIRS - the AML include directory
10# AML_DEFINITIONS - the AML definitions
11#
12# and the following imported targets::
13#
14# AML::AML - The AML codec
15
16find_path(AML_INCLUDE_DIR codec_error.h
17 PATH_SUFFIXES amcodec)
18
19include(FindPackageHandleStandardArgs)
20find_package_handle_standard_args(AML
21 REQUIRED_VARS AML_INCLUDE_DIR)
22
23if(AML_FOUND)
24 set(AML_INCLUDE_DIRS ${AML_INCLUDE_DIR})
25 set(AML_DEFINITIONS -DHAS_LIBAMCODEC=1)
26
27 if(NOT TARGET AML::AML)
28 add_library(AML::AML UNKNOWN IMPORTED)
29 set_target_properties(AML::AML PROPERTIES
30 INTERFACE_INCLUDE_DIRECTORIES "${AML_INCLUDE_DIR}"
31 INTERFACE_COMPILE_DEFINITIONS HAS_LIBAMCODEC=1)
32 endif()
33endif()
34
35mark_as_advanced(AMLCODEC_INCLUDE_DIR)