versionheader.cmake 378 B

12345678910
  1. function(GENERATE_VERSION_HEADER VERSION_FILE SIM_NAME)
  2. add_custom_target("${VERSION_FILE}")
  3. add_custom_command(TARGET "${VERSION_FILE}"
  4. COMMAND ${CUSTOM_SCRIPT_DIR}/generate_version_header.sh ${VERSION_FILE}
  5. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  6. )
  7. add_dependencies("${SIM_NAME}" "${VERSION_FILE}")
  8. endfunction(GENERATE_VERSION_HEADER)