On 11/14/2011 08:11 PM, Mathias Gaunard wrote:
What is the recommended way to define libraries with custom build commands?
This trick seems to be the only way:
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp)
endif()
What is the recommended way to define libraries with custom build commands?
This trick seems to be the only way:
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp)
endif()
add_library(foo dummy.cpp)
add_custom_command(TARGET foo POST_BUILD