[CMake] generate multiple packages the easiest way

AKHRES Nader nader.akhres at laposte.net
Sat Feb 27 10:41:45 EST 2010


ok, I manage to find another way:

I do this
SET(CPACK_GENERATOR_TXT "ZIP\;NSIS")  #just escape ; so that it still a 
string
SET(CPACK_GENERATOR ${CPACK_GENERATOR_TXT})  #here it becomes a list

then I use -DCPACK_GENERATOR=${CPACK_GENERATOR_TXT}
and it works fine!

Thank you Eric for you quick help, without you I would have seached in 
the wrong way!


Le 27/02/2010 16:19, AKHRES Nader a écrit :
>
> unfortunately this won't work either cause it's still interpreted as a 
> list...
> Here is my new idea: use a space separated string and turn into a list 
> in last cmake script... (ie I'll use -DCPACK_GENERATOR="ZIP TGZ" )
>
> I do this
> SET(CPACK_GENERATOR_TXT "ZIP NSIS")
> SET(CPACK_GENERATOR ${CPACK_GENERATOR_TXT})
>
> but CPACK_GENERATOR is not a list as I would have expected (I've read 
> it somewhere).
> Do I have to use regexp somewhere?
>
>
> Le 27/02/2010 14:34, Eric Noulard a écrit :
>> 2010/2/27 AKHRES Nader<nader.akhres at laposte.net>:
>>> I guess I've found my issue.
>>> I use a main script calling cmake command and passing 
>>> CPACK_GENERATOR like
>>> this:
>>> -DCPACK_GENERATOR
>>>
>>> Maybe this don't work for list.
>>> Is there any way to pass a list to command line cmake?
>> I would say that:
>> -DCPACK_GENERATOR="ZIP;TGZ" should work
>> but I'm not using command line for that....
>>
>
> _______________________________________________
> 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
>
>



More information about the CMake mailing list