代码拉取完成,页面将自动刷新
CMAKE_MINIMUM_REQUIRED(VERSION 3.13...3.20)
project(histreamer)
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
else ()
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
endif ()
set(TOP_DIR ${CMAKE_SOURCE_DIR})
set(DEV_TOP_DIR ${TOP_DIR})
# uncomment this line to enable Video
#set(VIDEO_ENABLE TRUE)
# uncomment this line to enable Recorder
set(RECORDER_ENABLE TRUE)
if (VIDEO_ENABLE)
add_definitions(-DVIDEO_SUPPORT) # add -DVIDEO_SUPPORT to enable video play
endif ()
if (RECORDER_ENABLE)
add_definitions(-DRECORDER_SUPPORT) # add -DRECORDER_SUPPORT to enable recorder
endif ()
set(CMAKE_VERBOSE_MAKEFILE ON)
IF (WIN32)
include_directories(
${TOP_DIR}/adapter/windows
)
ELSEIF (ANDROID)
ELSE ()
SET(LINUX_DEMO TRUE)
include_directories(
${TOP_DIR}/adapter/linux
)
ENDIF ()
set(THIRD_PARTY_DIR ${TOP_DIR}/3rdparty)
set(GTEST_ROOT_DIR ${TOP_DIR}/3rdparty/gtest)
set(MOCKCPP_DIR ${TOP_DIR}/3rdparty/mockcpp)
set(THIRD_PARTY_OH_DIR ${TOP_DIR}/3rdparty/ohos)
include_directories(
${TOP_DIR}/3rdparty/ffmpeg/include
${TOP_DIR}/3rdparty/SDL2.0/include
${TOP_DIR}/3rdparty/minimp3
${TOP_DIR}/3rdparty/curl/include
${TOP_DIR}/plugins
${THIRD_PARTY_OH_DIR}/third_party/bounds_checking_function/include
)
if (WIN32)
set(ffmpeg_lib_path ${TOP_DIR}/3rdparty/ffmpeg/windows/lib)
set(sdl_lib_path ${TOP_DIR}/3rdparty/SDL2.0/windows/lib/x64)
add_definitions(-DUSING_CLOCK_REALTIME -DWIN32)
endif ()
unset(OHOS_LITE CACHE)
option(OHOS_LITE "default player mode" ON)
if (OHOS_LITE)
add_definitions(-DOHOS_LITE)
endif ()
message(STATUS "OHOS_LITE is ${OHOS_LITE}")
if (OHOS_LITE)
add_compile_options(-std=c++14)
# player lite
include_directories(
${THIRD_PARTY_OH_DIR}/foundation/multimedia/media_lite/interfaces/innerkits
${THIRD_PARTY_OH_DIR}/foundation/multimedia/media_lite/interfaces/kits/player_lite
${THIRD_PARTY_OH_DIR}/foundation/multimedia/utils/lite/interfaces/kits
${THIRD_PARTY_OH_DIR}/foundation/graphic/surface/interfaces/kits
${THIRD_PARTY_OH_DIR}/foundation/graphic/utils/interfaces/kits
)
file(GLOB_RECURSE 3RDPARTY_SRCS
${THIRD_PARTY_OH_DIR}/foundation/multimedia/utils/lite/src/*.cpp
#${THIRD_PARTY_OH_DIR}/foundation/graphic/surface/frameworks/*.cpp
${THIRD_PARTY_OH_DIR}/third_party/bounds_checking_function/src/*.c
)
else ()
add_compile_options(-std=c++17)
# player standard
include_directories(
${THIRD_PARTY_OH_DIR}/foundation/multimedia/media_standard/services/services/engine_intf
${THIRD_PARTY_OH_DIR}/foundation/multimedia/media_standard/interfaces/innerkits/native/media/include
${THIRD_PARTY_OH_DIR}/utils/native/base/include
${THIRD_PARTY_OH_DIR}/foundation/graphic/standard/interfaces/innerkits/surface
${THIRD_PARTY_OH_DIR}/foundation/graphic/standard/interfaces/innerkits/common
${THIRD_PARTY_OH_DIR}/foundation/graphic/standard/utils/sync_fence/export
${THIRD_PARTY_OH_DIR}/foundation/communication/ipc/interfaces/innerkits/ipc_core/include
${THIRD_PARTY_OH_DIR}/foundation/graphic/standard/utils/buffer_handle/export
${THIRD_PARTY_OH_DIR}/drivers/peripheral/base
${THIRD_PARTY_OH_DIR}/drivers/peripheral/display/interfaces/include
${THIRD_PARTY_OH_DIR}/foundation/multimedia/image_standard/interfaces/innerkits/include
${THIRD_PARTY_OH_DIR}/foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocapturer/include
${THIRD_PARTY_OH_DIR}/foundation/multimedia/audio_standard/interfaces/inner_api/native/audiocommon/include
${THIRD_PARTY_OH_DIR}/foundation/multimedia/audio_standard/interfaces/inner_api/native/audiorenderer/include
${THIRD_PARTY_OH_DIR}/foundation/graphic/standard/interfaces/innerkits
${THIRD_PARTY_OH_DIR}/startup/syspara_lite/interfaces/innerkits/native/syspara/include
)
file(GLOB_RECURSE 3RDPARTY_SRCS
${THIRD_PARTY_OH_DIR}/foundation/multimedia/media_standard/services/utils/*.cpp
${THIRD_PARTY_OH_DIR}/foundation/graphic/standard/interfaces/innerkits/surface/*.cpp
${THIRD_PARTY_OH_DIR}/foundation/graphic/standard/utils/sync_fence/src/*.cpp
${THIRD_PARTY_OH_DIR}/foundation/multimedia/audio_standard/frameworks/innerkitsimpl/audiocapturer/src/*.cpp
${THIRD_PARTY_OH_DIR}/foundation/multimedia/audio_standard/frameworks/innerkitsimpl/audiorenderer/src/*.cpp
${THIRD_PARTY_OH_DIR}/utils/native/base/src/*.cpp
${THIRD_PARTY_OH_DIR}/startup/syspara_lite/interfaces/innerkits/native/syspara/src/*.c
${THIRD_PARTY_OH_DIR}/third_party/bounds_checking_function/src/*.c
)
endif()
set(GTEST_LIB gtest gtest_main)
set(PLAYER_INTERFACE_DIR ${TOP_DIR}/histreamer/interface)
add_subdirectory(histreamer)
if (CMAKE_HOST_UNIX)
add_subdirectory(demo/linux)
elseif (CMAKE_HOST_WIN32)
add_subdirectory(demo/windows)
add_subdirectory(demo/system_tests)
endif ()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。