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
COMMAND my command to replace the dummy libfoo
)
Is it normal that kind of thing is not possible with IMPORTED libraries?
--
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