|
|
|
@ -2,7 +2,6 @@ if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
@@ -2,7 +2,6 @@ if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
|
|
|
|
|
message(FATAL_ERROR "Please create a separate directory for build files.") |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.6) |
|
|
|
|
|
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
|
|
|
@ -20,47 +19,6 @@ endif()
@@ -20,47 +19,6 @@ endif()
|
|
|
|
|
|
|
|
|
|
set(ENABLE_MYSQL ON CACHE BOOL "enable mysql") |
|
|
|
|
|
|
|
|
|
##OpenCV |
|
|
|
|
if(WITH_OPENCV) |
|
|
|
|
if(CMAKE_TOOLCHAIN_FILE) |
|
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/include/opencv) |
|
|
|
|
set(OpenCV_LIBS opencv_core opencv_imgproc opencv_highgui opencv_features2d opencv_flann) |
|
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/include/opencv2/imgcodecs) |
|
|
|
|
list(APPEND OpenCV_LIBS opencv_imgcodecs) |
|
|
|
|
endif() |
|
|
|
|
if(EXISTS ${PROJECT_SOURCE_DIR}/include/opencv2/videoio) |
|
|
|
|
list(APPEND OpenCV_LIBS opencv_videoio) |
|
|
|
|
endif() |
|
|
|
|
message(STATUS "HAVE_OPENCV enabled") |
|
|
|
|
message(STATUS "opencv libraries: ${OpenCV_LIBS}") |
|
|
|
|
set(HAVE_OPENCV true) |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_OPENCV") |
|
|
|
|
else() |
|
|
|
|
set (HAVE_OPENCV false) |
|
|
|
|
endif() |
|
|
|
|
else() |
|
|
|
|
set(OpenCV_FIND_QUIETLY true) |
|
|
|
|
#find_package(OpenCV REQUIRED) //this will include opencv_ts which result in crash on centos |
|
|
|
|
find_package(OpenCV OPTIONAL_COMPONENTS imgcodecs) |
|
|
|
|
find_package(OpenCV OPTIONAL_COMPONENTS videoio) |
|
|
|
|
set(optional_opencv_libs ${OpenCV_LIBS}) |
|
|
|
|
find_package(OpenCV REQUIRED core imgproc highgui features2d) |
|
|
|
|
if(OpenCV_FOUND) |
|
|
|
|
if(imgcodecs_FOUND) |
|
|
|
|
list(APPEND OpenCV_LIBS optional_opencv_libs) |
|
|
|
|
endif() |
|
|
|
|
message(STATUS "HAVE_OPENCV enabled") |
|
|
|
|
message(STATUS "opencv libraries: ${OpenCV_LIBS}") |
|
|
|
|
set(HAVE_OPENCV true) |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_OPENCV") |
|
|
|
|
else() |
|
|
|
|
set (HAVE_OPENCV false) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
else() |
|
|
|
|
set (HAVE_OPENCV false) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
#查找mysql是否安装 |
|
|
|
|
find_package(MYSQL QUIET) |
|
|
|
|
if(MYSQL_FOUND AND ENABLE_MYSQL) |
|
|
|
@ -78,7 +36,6 @@ include_directories(${PROJECT_SOURCE_DIR}/modules/dataType/include/)
@@ -78,7 +36,6 @@ include_directories(${PROJECT_SOURCE_DIR}/modules/dataType/include/)
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/modules/Disposition/include/) |
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/modules/TcpProxySession/include/) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 寻找当前目录下所有源文件 |
|
|
|
|
aux_source_directory(./source/src DIR_SRCS) |
|
|
|
|
|
|
|
|
|