Crosscompiling on Windows system escapes $ORIGIN for INSTALL_RPATH
I am cross-compiling for a Linux system on my Windows machine. I need to set the RPATH property to $ORIGIN. For that I use the following code.
set_target_properties(LibraryName PROPERTIES INSTALL_RPATH "\$ORIGIN")
What I get is \$ORIGIN.
I also tried different ways to escape the $ sign
set_target_properties(LibraryName PROPERTIES INSTALL_RPATH "$ORIGIN")
-> \$ORIGIN
set_target_properties(LibraryName PROPERTIES INSTALL_RPATH $ORIGIN)
-> \$ORIGIN
set_target_properties(LibraryName PROPERTIES INSTALL_RPATH \$ORIGIN)
-> \$ORIGIN
set_target_properties(LibraryName PROPERTIES INSTALL_RPATH "\\\$ORIGIN")
-> \\\$ORIGIN
When I cross-compile the same project using a Linux machine, than it works. Meaning "\$ORIGIN" -> $ORIGIN.