On Wednesday 28 November 2012 14:40:47 you wrote:
> Hi Martin,
> 
> you have to add a custom command to generate your lib and make your custom
> target depending on it:
> 
> add_custom_command(
>       OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xxx.a
>       COMMAND
>               unzip -o ${CMAKE_CURRENT_SOURCE_DIR}/${ZIPFILE}
>       DEPENDS
>               ${CMAKE_CURRENT_SOURCE_DIR}/${ZIPFILE}
>       )
> 
> add_custom_target(
>       ${TARGET}_lib
>       DEPENDS
>               ${CMAKE_CURRENT_BINARY_DIR}/xxx.a
>       )
> 
> This will unzip the xxx.a only if your zipfile has changed.

Thanks for the help.

I now also finally found the problem here why the unzip was _always_ done:
The unzip restores the modification time of the file as it is inside the 
zipfile, which is
in the past.
To make it work correctly, I simply need to pass the option -DD to unzip to get 
the current
timestamp on the files, and voila!

-- 
Best regards/Schöne Grüße

Martin

A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

This mail was not scanned before sending.
It was sent from a secure Linux desktop.
--

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