VersionConfiguration.cmake 932 B

123456789101112131415161718192021222324252627282930313233
  1. # Get the current date.
  2. # include(WebClientVariables)
  3. string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
  4. # Get git revision version
  5. #include(GetGitRevisionDescription)
  6. #get_git_head_revision(REFSPEC FULL_GIT_REVISION)
  7. #if(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND")
  8. # set(GIT_REVISION "git")
  9. #else(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND")
  10. # string(SUBSTRING ${FULL_GIT_REVISION} 0 8 GIT_REVISION)
  11. #endif(FULL_GIT_REVISION STREQUAL "GITDIR-NOTFOUND")
  12. # Get the build number if available
  13. if(DEFINED ENV{BUILD_NUMBER})
  14. set(VERSION_BUILD "$ENV{BUILD_NUMBER}")
  15. set(VERSION_BUILD_NR "$ENV{BUILD_NUMBER}")
  16. else()
  17. set(VERSION_BUILD "dev")
  18. set(VERSION_BUILD_NR "0")
  19. endif()
  20. set(VERSION_MAJOR 2)
  21. set(VERSION_MINOR 58)
  22. set(VERSION_NANO 0)
  23. option(UPGRADE_DEBUG "" OFF)
  24. set(VERSION_STRING "1.3.0")
  25. set(VERSION_STRING_SHORT "1.3.0")
  26. set(CANONICAL_VERSION_STRING "1.3.0")
  27. configure_file(src/core/Version.cpp.in src/core/Version.cpp)