Commit 776dd4c0 by zqsong

恢复CMakeLists.txt

parent 124cce34
...@@ -2,14 +2,6 @@ ...@@ -2,14 +2,6 @@
cmake_minimum_required(VERSION 3.1.3) cmake_minimum_required(VERSION 3.1.3)
#使能c++11 #使能c++11
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
SET(CMAKE_C_COMPILER aarch64-himix100-linux-gcc)
SET(CMAKE_CXX_COMPILER aarch64-himix100-linux-g++)
#SET(CMAKE_LINKER aarch64-himix100-linux-ld)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#加载自定义模块 #加载自定义模块
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
...@@ -22,7 +14,6 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) ...@@ -22,7 +14,6 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(ToolKit_Root ${CMAKE_SOURCE_DIR}/3rdpart/ZLToolKit/src) set(ToolKit_Root ${CMAKE_SOURCE_DIR}/3rdpart/ZLToolKit/src)
set(MediaKit_Root ${CMAKE_SOURCE_DIR}/src) set(MediaKit_Root ${CMAKE_SOURCE_DIR}/src)
#设置头文件目录 #设置头文件目录
INCLUDE_DIRECTORIES(${ToolKit_Root}) INCLUDE_DIRECTORIES(${ToolKit_Root})
INCLUDE_DIRECTORIES(${MediaKit_Root}) INCLUDE_DIRECTORIES(${MediaKit_Root})
...@@ -41,15 +32,12 @@ endif () ...@@ -41,15 +32,12 @@ endif ()
set(ENABLE_HLS true) set(ENABLE_HLS true)
set(ENABLE_OPENSSL true) set(ENABLE_OPENSSL true)
set(ENABLE_MYSQL false) set(ENABLE_MYSQL true)
set(ENABLE_MP4V2 true) set(ENABLE_MP4V2 true)
set(ENABLE_FAAC false) set(ENABLE_FAAC true)
set(ENABLE_X264 false) set(ENABLE_X264 true)
set(ENABLE_MP4RECORD true) set(ENABLE_MP4RECORD true)
#添加两个静态库 #添加两个静态库
if(ENABLE_HLS) if(ENABLE_HLS)
message(STATUS "ENABLE_HLS defined") message(STATUS "ENABLE_HLS defined")
...@@ -66,22 +54,13 @@ if(ENABLE_MP4RECORD) ...@@ -66,22 +54,13 @@ if(ENABLE_MP4RECORD)
set(MediaServer_Root ${CMAKE_SOURCE_DIR}/3rdpart/media-server) set(MediaServer_Root ${CMAKE_SOURCE_DIR}/3rdpart/media-server)
list(APPEND LINK_LIB_LIST mov flv) list(APPEND LINK_LIB_LIST mov flv)
endif() endif()
set(OPENSSL_INCLUDE_DIR /nand/hi3559/openssl/include/)
set(OPENSSL_LIBRARIES /nand/hi3559/openssl/lib/)
#set(OPENSSL_CRYPTO_LIBRARIES /nand/hi3559/openssl/lib/libcrypto.so)
set(MP4V2_INCLUDE_DIR /nand/hi3559/mp4v2/include/)
#set(MP4V2_LIBRARY /nand/hi3559/mp4v2/lib/libmp4v2.a)
set(MP4V2_LIBRARY /nand/hi3559/mp4v2/lib/libmp4v2.so)
#查找openssl是否安装 #查找openssl是否安装
find_package(OpenSSL QUIET) find_package(OpenSSL QUIET)
if (1) if (OPENSSL_FOUND AND ENABLE_OPENSSL)
message(STATUS "found library:${OPENSSL_LIBRARIES},ENABLE_OPENSSL defined") message(STATUS "found library:${OPENSSL_LIBRARIES},ENABLE_OPENSSL defined")
include_directories(/nand/hi3559/openssl/include/) include_directories(${OPENSSL_INCLUDE_DIR})
add_definitions(-DENABLE_OPENSSL) add_definitions(-DENABLE_OPENSSL)
list(APPEND LINK_LIB_LIST /nand/hi3559/openssl/lib/libssl.so /nand/hi3559/openssl/lib/libcrypto.so) list(APPEND LINK_LIB_LIST ${OPENSSL_LIBRARIES})
endif () endif ()
#查找mysql是否安装 #查找mysql是否安装
...@@ -132,7 +111,7 @@ set(VS_FALGS "/wd4819 /wd4996 /wd4018 /wd4267 /wd4244 /wd4101 /wd4828 /wd4309 /w ...@@ -132,7 +111,7 @@ set(VS_FALGS "/wd4819 /wd4996 /wd4018 /wd4267 /wd4244 /wd4101 /wd4828 /wd4309 /w
if(ENABLE_HLS) if(ENABLE_HLS)
aux_source_directory(${MediaServer_Root}/libmpeg/include src_mpeg) aux_source_directory(${MediaServer_Root}/libmpeg/include src_mpeg)
aux_source_directory(${MediaServer_Root}/libmpeg/source src_mpeg) aux_source_directory(${MediaServer_Root}/libmpeg/source src_mpeg)
include_directories(${MediaServer_Root}/libmpeg/include) include_directories(${MediaServer_Root}/libmpeg/include)
add_library(mpeg STATIC ${src_mpeg}) add_library(mpeg STATIC ${src_mpeg})
if(WIN32) if(WIN32)
set_target_properties(mpeg PROPERTIES COMPILE_FLAGS ${VS_FALGS} ) set_target_properties(mpeg PROPERTIES COMPILE_FLAGS ${VS_FALGS} )
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论