I need to get this as a result in the preprocessor definitions of the msvc generator:
MYPATH=\"d:\\;.\\Lib\"
But when I use the following escape sequence in set_source_files_properties:
set_source_files_properties(source.c PROPERTIES COMPILE_FLAGS "-DMYPATH=\\\"d:\\\;.\\\\Lib\\\"")
the generated result is: MYPATH=\”d:\”;”.\Lib\”
Note the double-quoted semicolon. Is there a quoting workaround to allow unquoted semicolons?
AFAIR, cmake treat ; as list separator, so it behaves in such way for properties as per documentation.
PROPERTY [value1 [value2 …]
Probably you’ve better to try something like this – make it string variable and then try substitute it.
HTH,
Sergey