diff --git a/CMakeLists.txt b/CMakeLists.txt index 84edd5a..9c8d350 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() 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/) include_directories(${PROJECT_SOURCE_DIR}/modules/Disposition/include/) include_directories(${PROJECT_SOURCE_DIR}/modules/TcpProxySession/include/) - # 寻找当前目录下所有源文件 aux_source_directory(./source/src DIR_SRCS) diff --git a/docker/Dockerfile.satellite b/docker/Dockerfile.satellite index 3ea10ed..46d0452 100644 --- a/docker/Dockerfile.satellite +++ b/docker/Dockerfile.satellite @@ -2,7 +2,6 @@ FROM ubuntu:16.04 MAINTAINER - ARG with_satellite_code=yes RUN apt-get update && \ @@ -17,15 +16,13 @@ RUN apt-get update && \ # 拷贝文件 COPY ./3rdparty/ZLToolKit.tar.gz /root -COPY ./3rdparty/opencv.tar.gz /root -COPY ./3rdparty/kafka.tar.gz /root # install zltoolkit RUN cd /root/ && tar -zxvf ZLToolKit.tar.gz RUN cp -rf /root/ZLToolKit/lib/* /usr/lib/ RUN cp -rf /root/ZLToolKit/include/* /usr/include/ -RUN if [ "$with_cnstream_code" = "yes" ]; then \ +RUN if [ "$with_satellite_code" = "yes" ]; then \ cd /root && git clone http://120.79.157.137:80/lishengyin/Satellite.git Satellite && \ cd /root/Satellite && mkdir build && cd build &&\ cmake ..&& make -j; \ diff --git a/lib/libmodels.so b/lib/libmodels.so index 70f235f..6e3597a 100755 Binary files a/lib/libmodels.so and b/lib/libmodels.so differ diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 86fca27..12b9697 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -34,25 +34,6 @@ set(DEPENDENCIES "") set(CMAKE_MODULE_PATH ${CNSTREAM_ROOT_DIR}/cmake) -# ---[ opencv -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() - include_directories(${OpenCV_INCLUDE_DIRS}) - list(APPEND 3RDPARTY_LIBS ${OpenCV_LIBS}) - message(STATUS "opencv include: ${OpenCV_INCLUDE_DIRS}") - message(STATUS "opencv libraries: ${OpenCV_LIBS}") -else() - message(FATAL_ERROR "opencv not found!") -endif() - find_package(MYSQL QUIET) if(MYSQL_FOUND AND ENABLE_MYSQL) message(STATUS "找到mysqlclient库:\"${MYSQL_INCLUDE_DIR}\",ENABLE_MYSQL宏已打开")