[cmake-developers] [patch] fix Info.plist parser

Tim Blechmann tim at klingt.org
Thu Aug 7 13:36:54 EDT 2014


hi all,

attached patch adds support for parsing Info.plist files which are
generated with mac os9-style line endings (\r).

would be great if this fix can be applied (and if it would make it into
3.0.2).

thanks,
tim
-------------- next part --------------
From 0b1420c8c22885f3a4a086510a2041bc80be7732 Mon Sep 17 00:00:00 2001
From: Tim Blechmann <tim at klingt.org>
Date: Thu, 7 Aug 2014 19:30:27 +0200
Subject: [PATCH] cmake: allow Info.plist files which use os9-style \r line
 endings

Signed-off-by: Tim Blechmann <tim at klingt.org>
---
 Modules/BundleUtilities.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index b896de2..60d01b5 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -237,6 +237,7 @@ function(get_bundle_main_executable bundle result_var)
     file(READ "${bundle}/Contents/Info.plist" info_plist)
     string(REGEX REPLACE ";" "\\\\;" info_plist "${info_plist}")
     string(REGEX REPLACE "\n" "${eol_char};" info_plist "${info_plist}")
+    string(REGEX REPLACE "\r" "${eol_char};" info_plist "${info_plist}")
 
     # Scan the lines for "<key>CFBundleExecutable</key>" - the line after that
     # is the name of the main executable.
-- 
2.0.4



More information about the cmake-developers mailing list