Hi,

 

I'm using CMake 2.8.7 to generate VC++ 2010 project files on Windows 7.

 

At my CMakeLists.txt files I defined the following:

 

add_executable(VSData ${SRC} ${INC})

Target_link_libraries(VSData ${SOME_LIBS})

 

Now I start cmake from my build directory with: 

>cmake -G "Visual Studio 10" ..

 

This works and  I get the *.vcxproj files in build/VSData.

Now I want to copy the generated project files to another place at my file
system.

For this I added the following command at the end to my CMakeLists.txt:

 

add_custom_command(TARGET VSData 

     POST_BUILD 

     COMMAND ${CMAKE_COMMAND}

     ARGS -E copy ${CMAKE_BINARY_DIR}/VSData/VSData.vcxproj ${destDir}
VERBATIM)

 

I also tried this:

 

add_custom_command(TARGET VSData.vcxproj

       POST_BUILD 

       COMMAND ${CMAKE_COMMAND} 

       ARGS -E copy $<TARGET_FILE: VSData.vcxproj> ${destDir} VERBATIM)

 

But nothing happens! No error message, no warnings and the file will not be
copied!

 

 

 

 

 

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to