hyperion.ng/cmake/FindTurboJPEG.cmake
Paulchen Panther 662872dafe
feat: SchemaChecker & V4L2 enhancement (#734)
* libjpeg-turbo, QJsonSchemaChecker, V4L2 width/height/fps

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>

* Implement hyperion-v4l cli args

* Apply v4l2 settings during runtime

* feat: Provide minimum values for input restriction

* fix: merge mess

Co-authored-by: brindosch <edeltraud70@gmx.de>
2020-03-27 23:13:58 +01:00

34 lines
912 B
CMake

# FindTurboJPEG.cmake
# TURBOJPEG_FOUND
# TurboJPEG_INCLUDE_DIRS
# TurboJPEG_LIBRARY
find_path(TurboJPEG_INCLUDE_DIRS
NAMES turbojpeg.h
PATH_SUFFIXES include
)
find_library(TurboJPEG_LIBRARY
NAMES turbojpeg turbojpeg-static
PATH_SUFFIXES bin lib
)
if(TurboJPEG_INCLUDE_DIRS AND TurboJPEG_LIBRARY)
include(CheckCSourceCompiles)
include(CMakePushCheckState)
cmake_push_check_state(RESET)
list(APPEND CMAKE_REQUIRED_INCLUDES ${TurboJPEG_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${TurboJPEG_LIBRARY})
check_c_source_compiles("#include <turbojpeg.h>\nint main(void) { tjhandle h=tjInitCompress(); return 0; }" TURBOJPEG_WORKS)
cmake_pop_check_state()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TurboJpeg
FOUND_VAR TURBOJPEG_FOUND
REQUIRED_VARS TurboJPEG_LIBRARY TurboJPEG_INCLUDE_DIRS TURBOJPEG_WORKS
TurboJPEG_INCLUDE_DIRS TurboJPEG_LIBRARY
)