This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
81 lines (63 loc) · 1.77 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(RemoteVision)
# Search path
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CmakeModules)
# Platforms
option(BUILD_ANDROID "Building for ANDROID (library for ndk)" FALSE)
option(BUILD_SYMBIAN "Building for Symbian (library)" FALSE)
if(BUILD_ANDROID)
add_definitions(-DANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti ")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(Linux TRUE)
add_definitions(-DOS_LINUX)
add_definitions(-DOS_UNIX)
set(BUILD_LINUX TRUE)
endif()
if(WIN32)
add_definitions(-DOS_WIN32)
add_definitions(-include platform/win32/win32_config.h)
set(BUILD_WIN32 TRUE)
endif()
if(APPLE)
add_definitions(-DOS_APPLE)
set(BUILD_APPLE TRUE)
endif()
# Find some necessary packages
find_package(FFMPEG REQUIRED)
# Setup includes
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${FFMPEG_INCLUDE_DIR}
)
# Setup flags
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-D__STDC_CONSTANT_MACROS)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} )
endif()
add_definitions(-DSTATIC_INITIALIZER)
# Files
FILE(GLOB SOURCES *.cpp)
ADD_SUBDIRECTORY(medium)
ADD_SUBDIRECTORY(commands)
ADD_SUBDIRECTORY(providers)
ADD_SUBDIRECTORY(codecs)
ADD_SUBDIRECTORY(vsources)
ADD_SUBDIRECTORY(3rdparty)
ADD_SUBDIRECTORY(platform)
ADD_LIBRARY(RemoteVision SHARED ${SOURCES})
TARGET_LINK_LIBRARIES(RemoteVision ${DEPEND_LIBS})
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION include
FILES_MATCHING PATTERN "*.h"
REGEX "android|CmakeModules|build|.git" EXCLUDE)
INSTALL(TARGETS RemoteVision
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
ADD_SUBDIRECTORY(test)
IF(NOT BUILD_ANDROID)
ADD_SUBDIRECTORY(tools)
ENDIF()