summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindAML.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
committermanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
commit9fc8b732737f139d3e466510d75668ab45578960 (patch)
tree76db9bf5cb8cc869be908a5ed3d6f4cca3e3608a /project/cmake/modules/FindAML.cmake
parentb75e2659df11c23aa921d2eed83c23adc282ed27 (diff)
downloadkodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.gz
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.bz2
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindAML.cmake')
-rw-r--r--project/cmake/modules/FindAML.cmake35
1 files changed, 35 insertions, 0 deletions
diff --git a/project/cmake/modules/FindAML.cmake b/project/cmake/modules/FindAML.cmake
new file mode 100644
index 0000000..5b9a859
--- /dev/null
+++ b/project/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)