mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-20 08:47:50 +08:00
c sdk unix编译增加额外调试信息 (#4364)
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
This commit is contained in:
parent
6ccbd3aafb
commit
94be50e50a
@ -83,6 +83,24 @@ if(MSVC)
|
|||||||
target_sources(mk_api PRIVATE ${RESOURCE_FILE})
|
target_sources(mk_api PRIVATE ${RESOURCE_FILE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#relase 类型时额外输出debug调试信息
|
||||||
|
if(UNIX)
|
||||||
|
if("${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release")
|
||||||
|
find_program(OBJCOPY_FOUND objcopy)
|
||||||
|
if (OBJCOPY_FOUND)
|
||||||
|
add_custom_command(TARGET mk_api
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND objcopy --only-keep-debug ${EXECUTABLE_OUTPUT_PATH}/libmk_api.so ${EXECUTABLE_OUTPUT_PATH}/libmk_api.so.debug
|
||||||
|
COMMAND objcopy --strip-all ${EXECUTABLE_OUTPUT_PATH}/libmk_api.so
|
||||||
|
COMMAND objcopy --add-gnu-debuglink=${EXECUTABLE_OUTPUT_PATH}/libmk_api.so.debug ${EXECUTABLE_OUTPUT_PATH}/libmk_api.so
|
||||||
|
)
|
||||||
|
install(FILES ${EXECUTABLE_OUTPUT_PATH}/libmk_api.so.debug DESTINATION ${INSTALL_PATH_RUNTIME})
|
||||||
|
else()
|
||||||
|
message(STATUS "not found objcopy, generate libmk_api.so.debug skip")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# IOS 跳过测试代码
|
# IOS 跳过测试代码
|
||||||
if(IOS)
|
if(IOS)
|
||||||
return()
|
return()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user