[CMake] Post-Build Step on Windows
Hari Sundar
hsundar at gmail.com
Thu Jun 5 21:09:01 EDT 2008
Hi,
I am trying to write a Post-Build step custom rule for Windows. It
basically involves copying the project shared library to a given
location.
When setup using INSTALL this works fine.
INSTALL(FILES config DESTINATION ${INSTALL_DIR}/plugins/${PROJECT_NAME})
INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION
${INSTALL_DIR}/plugins/${PROJECT_NAME}/bin_release)
However, I am not able to get this to work as a post-build step.
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${PROJECT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.${CMAKE_SHARED_LIBRARY_SUFFIX}
${INSTALL_DIR}/plugins/${PROJECT_NAME}/bin_release
)
Any suggestions ?
thanks,
~Hari
More information about the CMake
mailing list