[CMake] INSTALL(NEW_DIRECTORY...) ?

Jack Kelly endgame.dos at gmail.com
Fri Aug 24 05:25:47 EDT 2007


Dizzy wrote:
> On install I would need cmake to portably create some empty directories that 
> do not exist in the source. INSTALL(DIRECTORY...) just copies an existent 
> structure in my case that structure does not exists. I know I could probably 
> search for some external mkdir command and use it but then I would have to 
> think of any possible platform and try to find the command for that platform 
> and also worry about whatever parameters it wants. cmake already has logic to 
> create directories in a platform independent way used by the various 
> INSTALL(...) commands, it would be nice if there was a way to use it to 
> create some arbitrary directories on install (their path of course it still 
> respects CMAKE_INSTALL_PREFIX and such).
> 
> To solve this in automake I just created some dummy "<stuff>_dir" variables 
> that automake interpreted and created those empty directories on install. I 
> would like to know if there is something similar for cmake, thank you!
> 
You could try assembling the empty directory structure with

FILE(MAKE_DIRECTORY ${foo_BINARY_DIR}/path)

and install that.

-- Jack


More information about the CMake mailing list