function(get_version_info WORKING_DIRECTORY SOFTWARE_VERSION SOFTWARE_DFU_VERSION SOFTWARE_RC_VERSION)
  # Note, these commands are Linux only. Check for other OS how to retrieve this info
  execute_process(COMMAND sed -n "1p" "${WORKING_DIRECTORY}/VERSION" OUTPUT_VARIABLE LOCAL_SOFTWARE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
  execute_process(COMMAND sed -n "2p" "${WORKING_DIRECTORY}/VERSION" OUTPUT_VARIABLE LOCAL_SOFTWARE_DFU_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
  execute_process(COMMAND sed -n "3p" "${WORKING_DIRECTORY}/VERSION" OUTPUT_VARIABLE LOCAL_SOFTWARE_RC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
#  set(${SOFTWARE_VERSION} "${LOCAL_SOFTWARE_VERSION}" PARENT_SCOPE)
  if(LOCAL_SOFTWARE_RC_VERSION AND NOT LOCAL_SOFTWARE_RC_VERSION STREQUAL "")
    set(${SOFTWARE_VERSION} "${LOCAL_SOFTWARE_VERSION}-${LOCAL_SOFTWARE_RC_VERSION}" PARENT_SCOPE)
  else()
    set(${SOFTWARE_VERSION} "${LOCAL_SOFTWARE_VERSION}" PARENT_SCOPE)
  endif()
  set(${SOFTWARE_DFU_VERSION} "${LOCAL_SOFTWARE_DFU_VERSION}" PARENT_SCOPE)
  set(${SOFTWARE_RC_VERSION} "${LOCAL_SOFTWARE_RC_VERSION}" PARENT_SCOPE)
endfunction()
