openauto/cmake_modules/Findh264.cmake
Cole Brinsfield 8fa72b4f43
whitescreen workaround (#27)
* Terrible, Horrible, No Good, Very Bad Hack for h264

* Add setting to turn on this terrible hack

* Handle multiple video resolutions

* Use h264bitstream to do this better

* Remove all parameters we don't want

* Cleaning things up a little

* Renaming whitescreen workaround, defaulting to on
2022-02-12 14:33:02 -06:00

27 lines
898 B
CMake

set (H264_INCLUDE_DIR /usr/local/include/h264bitstream)
set (H264_LIB_DIR /usr/local/lib)
set(H264_FOUND TRUE)
if (H264_FOUND)
if (NOT h264_FIND_QUIETLY)
message(STATUS "Found h264bitstream:")
message(STATUS " - Includes: ${H264_INCLUDE_DIR}")
message(STATUS " - Libraries: ${H264_LIB_DIR}")
endif()
add_library(h264 INTERFACE)
target_include_directories(h264 INTERFACE ${H264_INCLUDE_DIR})
set_target_properties(h264 PROPERTIES INTERFACE_LINK_DIRECTORIES ${H264_LIB_DIR})
target_link_libraries(h264 INTERFACE libh264bitstream.so)
else()
if (h264_FIND_REQUIRED)
if(H264_INCLUDE_DIR)
message(FATAL_ERROR "h264 was found but not built. Perform an in-source build.")
else()
message(FATAL_ERROR "Could not find h264")
endif()
endif()
endif()
mark_as_advanced(H264_INCLUDE_DIR H264_LIBRARIES)