Hi!<br><br>I have a problem with POST_BUILD events. I have a target:<br><br><br>add_library(blabla MODULE ${HDRS} ${SRCS}<br><br>smth like that. Then lately I add a POST_BUILD event:<br><br>add_custom_command(TARGET blabla POST_BUILD
<br> COMMAND ${7ZIP_BIN}/7z.exe a -tzip blablablabla<br>)<br><br>so now I create a NMakefile and a Visual Studio solution and everything works well except that my real target is not creating a DLL with add_library, but creating DLL _and_ packing it lately to some zip file. Now that zip file goes to somewhere and it is that zip file which is the real goal of the build process.
<br><br>So the problem is: when I delete this real target (this zip file) it won't be packed by NMake after calling NMake on generated NMakefile. NMake will see that the DLL is there so it won't call my blabla target "add_library" target. So I won't get the POST_BUILD event and nothing will be zipped. Only when I delete the DLL file I will get add_library target executed with it POST_BUILD event resulting in creating my goal zip.
<br><br>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. Is this possible? The only thing which I can think of is to add another target with the same zipping command and add it as a dependancy to my "blabla", so that my zipping target will be called before creating DLL and after creating DLL, so will be called anyway. Is there a better solution?
<br>