From 86f6217029c6b9c6dfba306ffeb59a817508387e Mon Sep 17 00:00:00 2001 From: Blake-sama <96248185+Blake-sama@users.noreply.github.com> Date: Sun, 27 Jul 2025 17:05:07 -0400 Subject: [PATCH] cmake: Escape quotes in commit names (#269) --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4738a81..7969c88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,11 +107,12 @@ protocolnew("stable/xdg-shell" "xdg-shell" false) protocolnew("staging/cursor-shape" "cursor-shape-v1" false) protocolnew("stable/tablet" "tablet-v2" false) +string(REPLACE "\"" " " GIT_COMMIT_MESSAGE_ESCAPED "${GIT_COMMIT_MESSAGE}") target_compile_definitions(hyprpaper PRIVATE "-DGIT_COMMIT_HASH=\"${GIT_COMMIT_HASH}\"") target_compile_definitions(hyprpaper PRIVATE "-DGIT_BRANCH=\"${GIT_BRANCH}\"") -target_compile_definitions( - hyprpaper PRIVATE "-DGIT_COMMIT_MESSAGE=\"${GIT_COMMIT_MESSAGE}\"") +target_compile_definitions(hyprpaper + PRIVATE "-DGIT_COMMIT_MESSAGE=\"${GIT_COMMIT_MESSAGE_ESCAPED}\"") target_compile_definitions(hyprpaper PRIVATE "-DGIT_DIRTY=\"${GIT_DIRTY}\"") target_link_libraries(hyprpaper rt)