setup_distribution_build.cmake 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. if (__setup_distribution_build_included)
  2. return ()
  3. endif ()
  4. set ( __setup_distribution_build_included YES )
  5. # simpler packages: provide -DPACK=1, and DISTR_BUILD will be set from env $DISTR, easier in dockers
  6. if (PACK)
  7. set ( DISTR_BUILD "$ENV{DISTR}" )
  8. endif ()
  9. # Make release build for the pointed distr
  10. # That will override defaults and give possibility to build
  11. # the distribution with minimal command line
  12. if (NOT DISTR_BUILD)
  13. return ()
  14. endif ()
  15. # set default options to be included into build
  16. set ( DISTR "${DISTR_BUILD}" CACHE STRING "Choose the distr." )
  17. set ( WITH_MYSQL 1 CACHE BOOL "Forced Mysql" FORCE )
  18. set ( WITH_EXPAT 1 CACHE BOOL "Forced Expat" FORCE )
  19. set ( WITH_POSTGRESQL 1 CACHE BOOL "Forced Pgsql" FORCE )
  20. set ( WITH_RE2 1 CACHE BOOL "Forced RE2" FORCE )
  21. set ( WITH_STEMMER 1 CACHE BOOL "Forced Stemmer" FORCE )
  22. set ( WITH_SSL 1 CACHE BOOL "Forced OpenSSL" FORCE )
  23. if (NOT "$ENV{PACK_KEEP_TESTS}" STREQUAL "1")
  24. SET ( BUILD_TESTING 0 CACHE BOOL "Forced no testing" FORCE )
  25. endif ()
  26. infomsg ( "DISTR_BUILD applied.
  27. Package will be set to ${DISTR_BUILD},
  28. also option forced to ON values: WITH_MYSQL, WITH_EXPAT, WITH_POSTGRESQL, WITH_RE2, WITH_STEMMER, WITH_SSL.
  29. Also LIBS_BUNDLE is automatically set to folder 'bundle' placed one level above the sources" )