[CMake] Custom command with unknown inputs and dependencies

rizor sven.czar at gmail.com
Wed Aug 15 17:23:10 EDT 2012


Hey guys,

I have a problem with my custom command.
The target is to generate an archive of different shared libraries.

The current code:

file(GLOB Modules "Obj/lib/*.dll")
foreach(Module ${Modules})
	set(ModulesGZip "${ModuleGZip} ${Module}")
endforeach(Module ${Modules})

add_custom_command(OUTPUT Obj/Modules.gz
                               PRE_LINK
                               COMMAND "gzip -f -9 -c${ModulesGZip} >
Obj/Modules.gz"
                               DEPENDS Library Memory
                               COMMENT "compress all generated modules")

The first problem is, that the custom command gets an error.
The shell can not find the file (I do not know which one).
If I use the command directly on the shell, everything works fine.

The second problem is, that I do not know all dependencies.
How can I generate the dependencies dynamically?

Thank you.

Greetings,
Sven



--
View this message in context: http://cmake.3232098.n2.nabble.com/Custom-command-with-unknown-inputs-and-dependencies-tp7581231.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list