[CMake] copy a source file at configure
William A. Hoffman
billlist at nycap.rr.com
Tue Dec 7 15:20:18 EST 2004
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