[CMake] copy a source file at configure

Leila baghdadi baghdadi at sickkids.ca
Tue Dec 7 15:32:42 EST 2004


Bill and Andy

thanks for the comments

I think my problem was my windows machine had cmake 1.8,

I just installed 2.0.5 and things seem to work now

Leila

On Tue, 2004-12-07 at 15:20, William A. Hoffman wrote:
> CONFIGURE_FILE should work.  Use full paths.
> You can use the variables PROJECT_SOURCE_DIR and
> PROJECT_BINARY_DIR.  You can either use PROJECT_
> or the name of the project from the PROJECT(foo)
> command.  (i.e. foo_SOURCE_DIR foo_BINARY_DIR).
> 
> CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/source/A.h-win32 ${PROJECT_BINARY_DIR}/source/B/A.h COPYONLY)
> 
> -Bill
> 
> At 03:07 PM 12/7/2004, Leila baghdadi wrote:
> >Hi everyone
> >
> >I was just wondering if anyone knows how to do a following
> >
> >
> >I need to create a directory and then copy some header files to this
> >directory before the built
> >
> >i.e only filename and location changed and the content remains the same 
> >
> >source/A.h-win32 to
> >source/B/A.h
> >
> >so I tried MAKE_DIRECTORY(B) and then
> >
> >CONFIGURE_FILE(source/A.h-win32 source/B/A.h COPYONLY)
> >
> >but I can not get it to work
> >
> >I also tried 
> >
> >ADD_CUSTOM_COMMAND(..)
> >
> >but that was also not successful,
> >
> >
> >any thoughts
> >
> >
> >thanks
> >
> >
> >Leila
> >
> >_______________________________________________
> >CMake mailing list
> >CMake at www.cmake.org
> >http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list