summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindAML.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindAML.cmake')
-rw-r--r--cmake/modules/FindAML.cmake49
1 files changed, 0 insertions, 49 deletions
diff --git a/cmake/modules/FindAML.cmake b/cmake/modules/FindAML.cmake
deleted file mode 100644
index 89d1fd9..0000000
--- a/cmake/modules/FindAML.cmake
+++ /dev/null
@@ -1,49 +0,0 @@
1#.rst:
2# FindAML
3# -------
4# Finds the AML codec
5#
6# This 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
23include(CheckCSourceCompiles)
24set(CMAKE_REQUIRED_INCLUDES ${AML_INCLUDE_DIR})
25check_c_source_compiles("#include <amcodec/codec.h>
26
27 int main()
28 {
29 int i = VIDEO_DEC_FORMAT_VP9;
30 return 0;
31 }
32 " AML_HAS_VP9)
33
34if(AML_FOUND)
35 set(AML_INCLUDE_DIRS ${AML_INCLUDE_DIR})
36 set(AML_DEFINITIONS -DHAS_LIBAMCODEC=1)
37 if(AML_HAS_VP9)
38 list(APPEND AML_DEFINITIONS -DHAS_LIBAMCODEC_VP9=1)
39 endif()
40
41 if(NOT TARGET AML::AML)
42 add_library(AML::AML UNKNOWN IMPORTED)
43 set_target_properties(AML::AML PROPERTIES
44 INTERFACE_INCLUDE_DIRECTORIES "${AML_INCLUDE_DIR}"
45 INTERFACE_COMPILE_DEFINITIONS HAS_LIBAMCODEC=1)
46 endif()
47endif()
48
49mark_as_advanced(AMLCODEC_INCLUDE_DIR)