Stefan Schimanski wrote:
> Hi!
>
> Cmake has a generator to produce a project file for Apple's Xcode IDE.
> The resulting project of LyX cannot be opened though by Xcode because it
> cannot be parsed. The reason seems to be a bug in cmake which translates
>
> add_definitions(-DLOCALEDIR=\\"${LOCALE_DIR}\\")
>
> into
>
> OTHER_CFLAGS = "-DLOCALEDIR=\\"\\" ";
>
> in the Xcode project which obviously is invalid (\\ is an escaped \).
> Moreover \\\" is translated into \\" and \\\\\" into \\\". The last one
> gives a valid Xcode project, but translates to the invalid \\" in the
> GNU make generator.
>
> Fortunately there is a variant not affected by this inconsistency:
>
> add_definitions(-DLOCALEDIR='\"${LOCALE_DIR}\"')
>
> which translated correctly into a valid GNU make project and Xcode
> project. The patch is attached.
>
> Schimmi
>
>
Thanks Schimmi, I've committed this patch because your patch doesn't work
with msvc.
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 17719)
+++ CMakeLists.txt (working copy)
@@ -23,15 +23,22 @@
-DDEPENDS_ON_LIBICONV=1
)
-
+if (NOT APPLE)
add_definitions(
-DLOCALEDIR=\\"${LOACLE_DIR}\\"
-DLOCALE_ALIAS_PATH=\\"${LOACLE_DIR}\\"
-DLIBDIR=\\"${TOP_SRC_DIR}\\"
-DINSTALLDIR=\\"${PREFIX}\\"
)
+else (NOT APPLE)
+add_definitions(
+ -DLOCALEDIR='\"${LOCALE_DIR}\"'
+ -DLOCALE_ALIAS_PATH='\"${LOCALE_DIR}\"'
+ -DLIBDIR='\"${TOP_SRC_DIR}\"'
+ -DINSTALLDIR='\"${PREFIX}\"'
+ )
+endif (NOT APPLE)
Have you tried the -Dmerge=1 option? It speeds up the
compilation by factor 2 to 3. I wonder if it also
works on the mac.
Peter