[CMake] delayed target

Andrea Crotti andrea.crotti.0 at gmail.com
Wed Feb 22 11:02:30 EST 2012


Again I'm having some troubles with the different building stages:

I would like to have a target that simply unzips all the files contained 
in a directory,
which can be found with a simple globbing.

  add_custom_target(unzip_all_eggs
    file(GLOB eggs RELATIVE ${EGG_BUILD_DIRECTORY}/*egg)
    COMMAND ${PYTHON_EXECUTABLE} ${UNZIP_SCRIPT} ${egg}
    )


The problem is that when I actually run cmake these files don't exist yet,
so this command could not really work...

A possible solution is to make my UNZIP_SCRIPT smarter and just do the 
globbing
itself, is there any other more CMake-like solution?


More information about the CMake mailing list