1 Star 0 Fork 28

郭春婷/histreamer_dev

forked from histreamer/histreamer_dev 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
histreamer.cmake 2.36 KB
一键复制 编辑 原始数据 按行查看 历史
wuyouqian 提交于 2022-06-29 09:26 . !43 change 3d audio test stream
include(FetchContent)
################################################################
# test_resource.git : depends and resource
FetchContent_Declare(resource
GIT_REPOSITORY https://gitee.com/histreamer/test_resource.git
GIT_TAG master
)
SET(RESOURCE_SRC ${CMAKE_BINARY_DIR}/_deps/resource-src)
if(NOT EXISTS ${RESOURCE_SRC})
message("-- Download resource and copy depends. Resource directory : " ${RESOURCE_SRC})
FetchContent_Populate(resource)
file(COPY ${resource_SOURCE_DIR}/depends/3rdparty DESTINATION ${TOP_DIR})
else()
message("-- Resource directory exists : " ${RESOURCE_SRC})
endif()
add_definitions(-DRESOURCE_DIR="${RESOURCE_SRC}/media")
if (AVS3DA_ENABLE)
add_definitions(-DAVS3DA_CODEC_DIR="${HISTREAMER_PLUGINS_DIR}/codec/avs3_audio_decoder/avs3_codec/avs3Decoder/")
if (NOT EXISTS ${RESOURCE_SRC}/media/AVS3DA AND EXISTS ${HISTREAMER_PLUGINS_DIR}/media/AVS3DA)
file(COPY ${HISTREAMER_PLUGINS_DIR}/media/AVS3DA DESTINATION ${RESOURCE_SRC}/media)
endif()
endif()
################################################################
# multimedia_histreamer.git : Create symbolic link of histreamer-res
FetchContent_Declare(histreamer
GIT_REPOSITORY https://gitee.com/openharmony/multimedia_histreamer.git
GIT_TAG master
)
macro(cmake_path_to_win_path InputPath ResultPath)
string(REPLACE "/" "\\" ${ResultPath} "${InputPath}")
endmacro()
set(HISTREAMER_SRC_PATH ${CMAKE_BINARY_DIR}/_deps/histreamer-src)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/histreamer)
message("-- Download histreamer ...")
FetchContent_Populate(histreamer)
if (CMAKE_HOST_UNIX)
execute_process(COMMAND ln -s ${HISTREAMER_SRC_PATH} ${CMAKE_SOURCE_DIR}/histreamer OUTPUT_VARIABLE output_result)
else()
cmake_path_to_win_path(${HISTREAMER_SRC_PATH} WIN_HISTREAMER_SRC_PATH)
cmake_path_to_win_path(${CMAKE_SOURCE_DIR}/histreamer WIN_HISTREAMER_LINK_PATH)
execute_process(COMMAND cmd.exe /c mklink /j ${WIN_HISTREAMER_LINK_PATH} ${WIN_HISTREAMER_SRC_PATH}
OUTPUT_VARIABLE output_result ERROR_VARIABLE error_result ENCODING UTF-8 )
endif()
message("-- Create histreamer symbolic link :")
message(" Info: " ${output_result})
else()
message("-- histreamer directory exists.")
endif()
add_subdirectory(histreamer)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/guo-chunting/histreamer_dev.git
git@gitee.com:guo-chunting/histreamer_dev.git
guo-chunting
histreamer_dev
histreamer_dev
master

搜索帮助