-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (26 loc) · 1.09 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(PHYSICAL_DEBUGGING_CAMERA VERSION 0.0.1)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
endif()
include_directories(${CMAKE_SOURCE_DIR}/include/)
find_package(jsoncpp REQUIRED)
find_package(OpenCV REQUIRED
core imgproc imgcodecs highgui calib3d)
set(FFMPEG_ROOT /usr/local/bin/ffmpeg)
set(CMAKE_PREFIX_PATH ${FFMPEG_ROOT})
set(FFMPEG_DEP_LIB /usr/local/lib)
# Get FFmpeg version and print it in the CMake log
execute_process(
COMMAND ${FFMPEG_EXECUTABLE} -version
OUTPUT_VARIABLE FFMPEG_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Found FFmpeg version: ${FFMPEG_VERSION}")
find_library(LIBYUV_LIB yuv PATHS /usr/local/lib REQUIRED)
find_library(AVCODEC_LIBRARIES avcodec HINTS ${FFMPEG_DEP_LIB}/lib REQUIRED)
find_library(AVFORMAT_LIBRARIES avformat HINTS ${FFMPEG_DEP_LIB}/lib REQUIRED)
find_library(AVUTIL_LIBRARIES avutil HINTS ${FFMPEG_DEP_LIB}/lib REQUIRED)
include_directories(${FFMPEG_DEP_LIB}/include)
add_subdirectory(app)
add_subdirectory(src)