diff options
author | Christian Fetzer <fetzer.ch@gmail.com> | 2017-01-02 22:16:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-02 22:16:26 +0100 |
commit | 2c4c414cdb2d2945b116597cee7ec35c54e95796 (patch) | |
tree | 97baa31cf8273e721f313c339e999acb8bbc7d21 /cmake | |
parent | b9698085a83c6c29b5bdd5087b96fc4f193675a7 (diff) | |
parent | dd2e5f51c147169faff9d8c6adbdaf0ba8ec9626 (diff) |
Merge pull request #11288 from lrusak/imx
[cmake] add imx support
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindIMX.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cmake/modules/FindIMX.cmake b/cmake/modules/FindIMX.cmake new file mode 100644 index 0000000000..3689579549 --- /dev/null +++ b/cmake/modules/FindIMX.cmake @@ -0,0 +1,38 @@ +#.rst: +# FindIMX +# ------- +# Finds the IMX codec +# +# This will will define the following variables:: +# +# IMX_FOUND - system has IMX +# IMX_INCLUDE_DIRS - the IMX include directory +# IMX_DEFINITIONS - the IMX definitions +# IMX_LIBRARIES - the IMX libraries + +if(PKG_CONFIG_FOUND) + pkg_check_modules(IMX fslvpuwrap QUIET) +endif() + +find_path(IMX_INCLUDE_DIR NAMES vpu_wrapper.h + PATH_SUFFIXES imx-mm/vpu + PATHS ${PC_IMX_INCLUDEDIR}) + +find_library(FSLVPUWRAP_LIBRARY NAMES fslvpuwrap + PATHS ${PC_IMX_LIBDIR}) +find_library(VPU_LIBRARY NAMES vpu + PATHS ${PC_IMX_LIBDIR}) +find_library(G2D_LIBRARY NAMES g2d + PATHS ${PC_IMX_LIBDIR}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(IMX + REQUIRED_VARS IMX_INCLUDE_DIR FSLVPUWRAP_LIBRARY VPU_LIBRARY G2D_LIBRARY) + +if(IMX_FOUND) + set(IMX_INCLUDE_DIRS ${IMX_INCLUDE_DIR}) + set(IMX_LIBRARIES ${FSLVPUWRAP_LIBRARY} ${VPU_LIBRARY} ${G2D_LIBRARY}) + set(IMX_DEFINITIONS -DHAS_IMXVPU=1 -DLINUX -DEGL_API_FB) +endif() + +mark_as_advanced(IMX_INCLUDE_DIR FSLVPUWRAP_LIBRARY VPU_LIBRARY G2D_LIBRARY) |