set(ROBOCIN_PROJECT_NAME "project-unification")

if (NOT DEFINED ROBOCIN_PROJECT_NAME)
  message(FATAL_ERROR "ROBOCIN_PROJECT_NAME is not defined.")
endif ()

set(ROBOCIN_PROJECT_VERSION_MAJOR 0)
set(ROBOCIN_PROJECT_VERSION_MINOR 0)
set(ROBOCIN_PROJECT_VERSION_PATCH 0)

set(ROBOCIN_PROJECT_VERSION "${ROBOCIN_PROJECT_VERSION_MAJOR}.${ROBOCIN_PROJECT_VERSION_MINOR}.${ROBOCIN_PROJECT_VERSION_PATCH}")

function(ROBOCIN_LINK_PROJECT_DEFINITIONS TARGET_NAME PROJECT_ROOT)
  target_compile_definitions(${TARGET_NAME} PRIVATE ROBOCIN_PROJECT_NAME="${ROBOCIN_PROJECT_NAME}")
  target_compile_definitions(${TARGET_NAME} PRIVATE ROBOCIN_PROJECT_PATH="${PROJECT_ROOT}")

  target_compile_definitions(${TARGET_NAME} PRIVATE ROBOCIN_PROJECT_VERSION_MAJOR=${ROBOCIN_PROJECT_VERSION_MAJOR})
  target_compile_definitions(${TARGET_NAME} PRIVATE ROBOCIN_PROJECT_VERSION_MINOR=${ROBOCIN_PROJECT_VERSION_MINOR})
  target_compile_definitions(${TARGET_NAME} PRIVATE ROBOCIN_PROJECT_VERSION_PATCH=${ROBOCIN_PROJECT_VERSION_PATCH})

  target_compile_definitions(${TARGET_NAME} PRIVATE ROBOCIN_PROJECT_VERSION="${ROBOCIN_PROJECT_VERSION}")
endfunction()
