-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
47 lines (35 loc) · 1.22 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
38
39
40
41
42
43
44
45
46
47
project(stealth-converter CXX)
cmake_minimum_required(VERSION 3.5.1)
set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-std=c++14 -Wextra -Wall -g3 -O0")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
include_directories(".")
if (NOT DEFINED PARALLEL)
set(PARALLEL 0)
endif ()
if (PARALLEL EQUAL 1)
add_definitions(-DPARALLEL)
endif ()
add_subdirectory("src/stream")
add_subdirectory("src/video-converter/")
add_executable(stealth-converter src/stealth-converter.cc
$<TARGET_OBJECTS:STREAM> $<TARGET_OBJECTS:VIDEO_CONVERTER>)
find_package(OpenCV REQUIRED)
if (OPENCV_FOUND)
message("Found OpenCV library")
target_link_libraries(stealth-converter ${OpenCV_LIBS})
endif (OPENCV_FOUND)
find_package(FFmpeg REQUIRED)
if (FFMPEG_FOUND)
message("Found FFMPEG/LibAV libraries")
include_directories(${FFMPEG_INCLUDE_DIR})
target_link_libraries(stealth-converter ${FFMPEG_LIBRARIES})
endif (FFMPEG_FOUND)
find_package(TBB REQUIRED)
if (TBB_FOUND)
message("Found TBB library")
include_directories(${TBB_INCLUDE_DIRS})
add_definitions(${TBB_DEFINITIONS})
target_link_libraries(stealth-converter ${TBB_LIBRARIES})
endif (TBB_FOUND)
target_link_libraries(stealth-converter "-lm -lavresample")