From 8f4e76406c6a9339f41f5b6122f5b73c0570b280 Mon Sep 17 00:00:00 2001 From: snysmtx Date: Fri, 22 Dec 2023 17:40:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=20rpm=20?= =?UTF-8?q?=E6=97=B6=E8=8E=B7=E5=8F=96=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98=20(#3151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release 8.0 之后, 编译 rpm 会出现获取调试信息失败问题, 导致 rpm 打包失败 虽然说可以禁用调试包生成来规避问题, 但个人认为在编译 DEBUG 版本时生成调试信息包还是有必要的 --- CMakeLists.txt | 6 ++++++ package/rpm/ZLMediaKit.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9dbfa64..64157b7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,6 +193,12 @@ if(UNIX) "-Wall;-Wextra" "-Wno-unused-function;-Wno-unused-parameter;-Wno-unused-variable" "-Wno-error=extra;-Wno-error=missing-field-initializers;-Wno-error=type-limits") + + if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + set(COMPILE_OPTIONS_DEFAULT ${COMPILE_OPTIONS_DEFAULT} "-g3") + else() + set(COMPILE_OPTIONS_DEFAULT ${COMPILE_OPTIONS_DEFAULT} "-g0") + endif() elseif(WIN32) if (MSVC) set(COMPILE_OPTIONS_DEFAULT diff --git a/package/rpm/ZLMediaKit.spec b/package/rpm/ZLMediaKit.spec index 9ff902d6..f26aba10 100644 --- a/package/rpm/ZLMediaKit.spec +++ b/package/rpm/ZLMediaKit.spec @@ -18,7 +18,7 @@ %bcond_with cxx_api Name: ZLMediaKit -Version: 5.0.0 +Version: 8.0.0 Release: 1%{?dist} Summary: A lightweight, high performance and stable stream server and client framework based on C++11.