I believe the canonical answer is to write the command line you wish
to execute into a file and use install(SCRIPT ...) instead of
install(CODE ...).

tyler

On Fri, Mar 11, 2011 at 7:14 AM, Urbach, Marcel [Rohmann GmbH]
<urb...@rohmann.de> wrote:
> 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.
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to