I have already tried to use the SCRIPT. But there is a problem to submit the 
name of the dll or the project name to the extern script. I need something like 
a  parameter and I guess that doesn't exsist. Do you have any ideas to solve 
this?
INSTALL(SCRIPT "PostInst.cmake" PARAMETeR...)

I also tried to use execute_process, but it didn't work with regsvr32.  
It ended in an endless loop. Only a timeout could break it. Can you confirm 
that?

-----Ursprüngliche Nachricht-----
Von: David Cole [mailto:david.c...@kitware.com] 
Gesendet: Freitag, 11. März 2011 16:50
An: Tyler
Cc: Urbach, Marcel [Rohmann GmbH]; cmake@cmake.org
Betreff: Re: [CMake] INSTALL CODE using EXEC_PROGRAM with spaces in path

Tyler's right. Use install(SCRIPT instead.

And use execute_process instead of exec_program. It's better.

>From the help at
http://cmake.org/cmake/help/cmake-2-8-docs.html#command:execute_process
:
"The execute_process command is a newer more powerful version of
exec_program, but the old command has been kept for compatibility."


On Fri, Mar 11, 2011 at 10:34 AM, Tyler <ty...@cryptio.net> wrote:
> 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
>
_______________________________________________
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