-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
37 lines (25 loc) · 935 Bytes
/
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 2.8)
project(SimpleVideoInput)
# Output settings
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules;${CMAKE_MODULE_PATH}")
set(SVI_SRC_DIR ${PROJECT_SOURCE_DIR}/src)
# Use C++11
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -D__STDC_CONSTANT_MACROS")
endif (CMAKE_COMPILER_IS_GNUCXX)
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
endif (APPLE)
# Packages
find_package(OpenCV REQUIRED core highgui)
find_package(FFmpeg REQUIRED)
# Options
option(WITH_EXAMPLES "add example projects" FALSE)
if (WITH_EXAMPLES)
add_subdirectory(examples)
endif (WITH_EXAMPLES)
option(BUILD_STATIC "build a static lib" FALSE)
add_subdirectory(src)