fxsdk/fxsdk/cmake/FxsdkUtils.cmake
Lephenixnoir e31d053a08
fxsdk: handle parentheses in paths for fxgxa
Quotes are still impossible because CMake is unredeemable in that
regard.
2022-11-25 10:56:59 +01:00

8 lines
259 B
CMake

# Who doesn't love to deal with escaping?!
function(shell_escape _str _out)
string(REPLACE "'" "\\'" _str "${_str}")
string(REPLACE "(" "\\(" _str "${_str}")
string(REPLACE ")" "\\)" _str "${_str}")
set("${_out}" "${_str}" PARENT_SCOPE)
endfunction()