[CMake] INSTALL CODE using EXEC_PROGRAM with spaces in path
Urbach, Marcel [Rohmann GmbH]
urbach at rohmann.de
Fri Mar 11 10:14:11 EST 2011
Hi,
I am using Windows 7 and I have tried to register my builded dll files
with regsvr32 after installing them. It works for paths without spaces.
INSTALL( CODE
"EXEC_PROGRAM( regsvr32 ARGS \"/s\" ARGS \"C:\\lib\\test.dll\"
OUTPUT_VARIABLE POST_INST_OUT RETURN_VALUE POST_INST_RES )"
)
But when there a spaces inside a path regsvr32 returns with an error:
"Error loading module "C:\Program".
INSTALL( CODE
"EXEC_PROGRAM( regsvr32 ARGS \"/s\" ARGS \"C:\\Program
Files\\test\\lib\\test.dll\" OUTPUT_VARIABLE POST_INST_OUT RETURN_VALUE
POST_INST_RES )"
)
I have spended the whole day escaping the path in the right way but I
don't get it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110311/cf9263a3/attachment.htm>
More information about the CMake
mailing list