DefineCMakeDefaults.cmake 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. # (c) 2014 Copyright ownCloud GmbH
  2. # Redistribution and use is allowed according to the terms of the BSD license.
  3. # For details see the accompanying COPYING* file.
  4. # Always include srcdir and builddir in include path
  5. # This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in
  6. # about every subdir
  7. # since cmake 2.4.0
  8. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  9. # Put the include dirs which are in the source or build tree
  10. # before all other include dirs, so the headers in the sources
  11. # are prefered over the already installed ones
  12. # since cmake 2.4.1
  13. set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
  14. # Use colored output
  15. # since cmake 2.4.0
  16. set(CMAKE_COLOR_MAKEFILE ON)
  17. # Define the generic version of the libraries here
  18. set(GENERIC_LIB_VERSION "0.1.0")
  19. set(GENERIC_LIB_SOVERSION "0")
  20. # set -Werror
  21. set(CMAKE_ENABLE_WERROR ON)
  22. # Set the default build type to release with debug info
  23. if (NOT CMAKE_BUILD_TYPE)
  24. set(CMAKE_BUILD_TYPE RelWithDebInfo
  25. CACHE STRING
  26. "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
  27. )
  28. endif (NOT CMAKE_BUILD_TYPE)