From 7afcf43f209e9b80c8c1a87dc3d291a08a16a2b6 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 29 Aug 2022 10:42:07 +0300 Subject: [PATCH] - disabled discord-rpc debug info for configurations without it --- libraries/discordrpc/src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/discordrpc/src/CMakeLists.txt b/libraries/discordrpc/src/CMakeLists.txt index eea0efda14..18c3009e29 100644 --- a/libraries/discordrpc/src/CMakeLists.txt +++ b/libraries/discordrpc/src/CMakeLists.txt @@ -73,12 +73,15 @@ if(UNIX) target_link_libraries(discord-rpc PUBLIC pthread) target_compile_options(discord-rpc PRIVATE - -g -Wall -Wextra -Wpedantic ) + if (${CMAKE_BUILD_TYPE} STREQUAL Debug OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo) + target_compile_options(discord-rpc PRIVATE -g) + endif () + if (${WARNINGS_AS_ERRORS}) target_compile_options(discord-rpc PRIVATE -Werror) endif (${WARNINGS_AS_ERRORS})