Xcode: COMPILE_DEFINITIONS containing escaped quotes not generated correctly
CMake 3.29.2, Visual Studio 2022 17.9.6, Xcode 15.4 (AppleClang 15.0.0.15000309)
Using this entry in CMakeLists.txt
:
target_compile_definitions( ${APP_NAME} PUBLIC "HEADER=ABC(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\")" )
The generated Visual Studio project ends up with this entry, which compiles correctly:
HEADER=ABC("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
If generating a project for Xcode, this is the result in the project, which is incorrect:
HEADER=ABC("<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?>")
Is this a bug, or is the target_compile_definitions
entry incorrect?