[CMake] dependency problem + POST_BUILD events
Sergei Riaguzov
riaguzov at gmail.com
Mon Jul 30 06:34:43 EDT 2007
On 7/25/07, Brandon Van Every <bvanevery at gmail.com> wrote:
2Brandon: sorry for private e-mails, I have pressed the wrong button, they
should have gone here. My bad.
> Can this be solved somehow? What I want is my POST_BUILD event zipping my
> > DLL be called in case the DLL produced by add_library exists.
>
> You don't want a POST_BUILD event, you want 2 build rules. You want
> an ADD_CUSTOM_TARGET that zips up a file, and you want
> ADD_DEPENDENCIES on the dll it's going to zip up. Chicken has
> extensive examples of how to do this sort of thing, we have .tar .zip
> scripts. http://www.call-with-current-continuation.org/
Thanx But there's still one problem left. Now I have:
add_library(xxx ....)
add_custom_target(pack_jars ....)
..
add_dependencies(pack_jars xxx)
add_dependencies(INSTALL pack_jars)
and it works nicely except that now when I create an NMakefile I have to
call it with 'nmake pack_jars', not just 'nmake'. Is it solveable? Can I
change my 'all' target in NMakefile in such way that it depends on
'pack_jars' from CMakeLists.txt?
I have tried:
add_dependencies(ALL_BUILD pack_jars)
but this results in:
ADD_DEPENDENCIES Adding dependency to non-existent target: ALL_BUILD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070730/6a8ae727/attachment.html
More information about the CMake
mailing list