You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
2.5 KiB

  1. # Version
  2. Set ( CPPCORE_VERSION_MAJOR 1 )
  3. Set ( CPPCORE_VERSION_MINOR 0 )
  4. Set ( CPPCORE_VERSION_PATCH 0 )
  5. Set ( CPPCORE_VERSION_BUILD 0 )
  6. Set ( CPPCORE_VERSION_HASH "" )
  7. Set ( CPPCORE_VERSION_BEHIND 0 )
  8. Set ( CPPCORE_VERSION_DIRTY 0 )
  9. # Git Version
  10. If ( CPPCORE_USE_GIT_VERSION )
  11. Include ( git_helper OPTIONAL RESULT_VARIABLE HAS_GIT_HELPER )
  12. If ( HAS_GIT_HELPER )
  13. GitGetVersion ( ${CMAKE_CURRENT_LIST_DIR}/..
  14. CPPCORE_VERSION_MAJOR
  15. CPPCORE_VERSION_MINOR
  16. CPPCORE_VERSION_PATCH
  17. CPPCORE_VERSION_BUILD
  18. CPPCORE_VERSION_HASH
  19. CPPCORE_VERSION_BEHIND
  20. CPPCORE_VERSION_DIRTY )
  21. EndIf ( )
  22. EndIf ( )
  23. # Strings
  24. Set ( CPPCORE_VERSION_SHORT "${CPPCORE_VERSION_MAJOR}.${CPPCORE_VERSION_MINOR}" )
  25. Set ( CPPCORE_VERSION "${CPPCORE_VERSION_SHORT}.${CPPCORE_VERSION_PATCH}.${CPPCORE_VERSION_BUILD}" )
  26. Set ( CPPCORE_VERSION_COMPLETE "${CPPCORE_VERSION}" )
  27. Set ( CPPCORE_NAME "cppcore-${CPPCORE_VERSION_SHORT}" )
  28. Set ( CPPCORE_OUTPUTNAME "cppcore" )
  29. If ( CPPCORE_VERSION_BEHIND )
  30. Set ( CPPCORE_VERSION_COMPLETE "${CPPCORE_VERSION_COMPLETE}+${CPPCORE_VERSION_BEHIND}" )
  31. EndIf ( )
  32. # Install directories
  33. Set ( CPPCORE_INSTALL_DIR_INCLUDE "include/${CPPCORE_NAME}" )
  34. Set ( CPPCORE_INSTALL_DIR_LIB "lib" )
  35. Set ( CPPCORE_INSTALL_DIR_SHARE "share/${CPPCORE_NAME}" )
  36. # C Standard
  37. Set ( CMAKE_C_STANDARD 11 )
  38. Set ( CMAKE_CXX_STANDARD 17 )
  39. Set ( CMAKE_C_STANDARD_REQUIRED ON )
  40. Set ( CMAKE_CXX_STANDARD_REQUIRED ON )