-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
48 lines (39 loc) · 1.24 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
cmake_minimum_required(VERSION 3.5)
project (AISTREAM)
set(PROJECT_ROOT_PATH "${AISTREAM_SOURCE_DIR}")
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_INSTALL_PREFIX "${PROJECT_ROOT_PATH}/build/release")
if(NOT EXISTS "cfg")
execute_process(COMMAND ln -s ../cfg cfg)
endif()
if(NOT EXISTS "lib")
execute_process(COMMAND ln -s ../plugins/lib lib)
endif()
if(NOT EXISTS "samples")
execute_process(COMMAND ln -s ../samples samples)
endif()
if(NOT EXISTS "data")
execute_process(COMMAND ln -s ../work/data data)
endif()
if(NOT EXISTS ${PROJECT_ROOT_PATH}/plugins/lib)
execute_process(COMMAND mkdir -p ${PROJECT_ROOT_PATH}/plugins/lib)
endif()
option(PLUGINS "Plugins" ON)
message(STATUS "BUILD INFO:")
message(STATUS "\tPlugins: ${PLUGINS}")
message(STATUS "\tPrefix: ${CMAKE_INSTALL_PREFIX}")
execute_process(COMMAND ${PROJECT_ROOT_PATH}/work/pkg/pre_build.sh)
add_subdirectory(src)
add_subdirectory(work/cjson)
add_subdirectory(plugins)
include(cmake/libevent.cmake)
include(cmake/opencv.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/x264.cmake)
include(cmake/rtsp.cmake)
include(cmake/eigen.cmake)
include(cmake/rabbitmq.cmake)
include(cmake/mongodb.cmake)
include(cmake/freetype.cmake)
#include(cmake/grpc.cmake)
add_dependencies(ffmpeg x264)