Re: [CMake] Only install file if it does not exist?

2009-09-11 Thread Eric Noulard
2009/9/11 Bob Tanner : > On 2009-09-10 01:12:43 -0500, Eric Noulard said: > >> 0)  Write your parameterized  CMake script CopyIfNotExists.cmake.in >> >> 1)  CONFIGURE_FILE(CopyIfNotExists.cmake.in CopyIfNotExists.cmake) >>     This step will replace appropriate vars in CopyIfNotExists.cmake.in >>

Re: [CMake] Only install file if it does not exist?

2009-09-11 Thread Bob Tanner
On 2009-09-10 01:12:43 -0500, Eric Noulard said: 0) Write your parameterized CMake script CopyIfNotExists.cmake.in 1) CONFIGURE_FILE(CopyIfNotExists.cmake.in CopyIfNotExists.cmake) This step will replace appropriate vars in CopyIfNotExists.cmake.in with value coming from your cur

Re: [CMake] Only install file if it does not exist?

2009-09-09 Thread Eric Noulard
2009/9/10 Bob Tanner : > On 2009-09-09 05:53:15 -0500, David Cole said: > >> Or just use "install(FILES" -- it already does the "if not exists, if >> newer >> than" checks... > > INSTALL ( >        FILES ${CMAKE_CURRENT_SOURCE_DIR}/sample_features >        DESTINATION etc >        RENAME features

Re: [CMake] Only install file if it does not exist?

2009-09-09 Thread Bob Tanner
On 2009-09-09 05:53:15 -0500, David Cole said: Or just use "install(FILES" -- it already does the "if not exists, if newer than" checks... INSTALL ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/sample_features DESTINATION etc RENAME features ) Using that, if "etc/features" exis

Re: [CMake] Only install file if it does not exist?

2009-09-09 Thread David Cole
Or just use "install(FILES" -- it already does the "if not exists, if newer than" checks... Actually, what you have now is a strange combination of checking for the file's existence at "CMake configure" time, but then running a custom command at "make" time -- both of which happen before "make inst

Re: [CMake] Only install file if it does not exist?

2009-09-09 Thread Eric Noulard
2009/9/9 Bob Tanner : > I must be missing something simple? > > During "make install" I only want to install a set of files if the do not > exist in destination. > > MACRO (COPY_IF_DOES_NOT_EXIST SOURCE DESTINATION) >        ADD_CUSTOM_COMMAND ( >                TARGET COPY >                IF (NOT

[CMake] Only install file if it does not exist?

2009-09-08 Thread Bob Tanner
I must be missing something simple? During "make install" I only want to install a set of files if the do not exist in destination. MACRO (COPY_IF_DOES_NOT_EXIST SOURCE DESTINATION) ADD_CUSTOM_COMMAND ( TARGET COPY IF (NOT EXISTS ${DESTINATION})