-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit linux push audio and video sample code
- Loading branch information
xufengbao
committed
Dec 12, 2023
1 parent
a3ccfd4
commit 069d5f0
Showing
65 changed files
with
62,813 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
One-to-One-Video/NERtcSample-1to1-Linux-Console/PushAudioVideo/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
message("############# build nertc_sdk demo ############") | ||
|
||
project(nertc_demo) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
set(CMAKE_VERBOSE_MAKEFILE ON) | ||
|
||
# sdk api & lib | ||
if (TARGET_ARCH STREQUAL "x86_64" OR TARGET_ARCH STREQUAL "arm64") | ||
include_directories("${PROJECT_SOURCE_DIR}/NERTC_Linux_SDK_V5.4.10/${TARGET_ARCH}/include") | ||
link_directories("${PROJECT_SOURCE_DIR}/NERTC_Linux_SDK_V5.4.10/${TARGET_ARCH}/lib") | ||
else () | ||
message (FATAL_ERROR "TARGET_ARCH should be one of them: x86_64, arm64") | ||
endif() | ||
|
||
include_directories("${PROJECT_SOURCE_DIR}/cmdline") | ||
|
||
file(GLOB SRC ${PROJECT_SOURCE_DIR}/*.cpp) | ||
|
||
add_executable(${PROJECT_NAME} ${SRC}) | ||
|
||
target_link_libraries(${PROJECT_NAME} -Wl,--start-group) | ||
# static link libstdc++ and libgcc for compatibility | ||
target_link_libraries(${PROJECT_NAME} -static-libgcc -static-libstdc++) | ||
target_link_libraries(${PROJECT_NAME} -Wl,--exclude-libs,ALL) | ||
target_link_libraries(${PROJECT_NAME} nertc_sdk) | ||
target_link_libraries(${PROJECT_NAME} protoopp) | ||
target_link_libraries(${PROJECT_NAME} pthread) | ||
target_link_libraries(${PROJECT_NAME} -Wl,--end-group) | ||
|
||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) | ||
install(FILES ${PROJECT_SOURCE_DIR}/run.sh DESTINATION bin) | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/resource DESTINATION bin) | ||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/NERTC_Linux_SDK_V5.4.10/${TARGET_ARCH}/lib DESTINATION .) | ||
install(FILES ${PROJECT_SOURCE_DIR}/README.md DESTINATION .) |
Oops, something went wrong.