CMakeLists.txt 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ################################################################################
  2. # HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ################################################################################
  16. cmake_minimum_required(VERSION 2.8)
  17. PROJECT(docs)
  18. define_property(GLOBAL PROPERTY DOC_TARGETS BRIEF_DOCS "docs" FULL_DOCS "docs")
  19. mark_as_advanced(DOC_TARGETS)
  20. include(${CMAKE_MODULE_PATH}/docMacros.cmake)
  21. set (DOCBOOK_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/resources)
  22. set (DOCBOOK_XSL ${CMAKE_CURRENT_BINARY_DIR}/resources/docbook-xsl)
  23. #set (DOC_IMAGES ${CMAKE_CURRENT_SOURCE_DIR}/)
  24. set (XML_CATALOG ${CMAKE_CURRENT_BINARY_DIR}/BuildTools/catalog.xml)
  25. set (DOC_VERSION "${HPCC_MAJOR}.${HPCC_MINOR}.${HPCC_POINT}")
  26. set (FO_XSL ${CMAKE_CURRENT_BINARY_DIR}/BuildTools/fo.xsl)
  27. set (VERSION_DIR ${CMAKE_CURRENT_BINARY_DIR}/)
  28. set (ECLIPSE_HTML_XSL ${CMAKE_CURRENT_BINARY_DIR}/BuildTools/EclipseHelp.xsl)
  29. #set (ECL_REFERENCE_XML ${CMAKE_CURRENT_BINARY_DIR}/ECLReference/ECLReference.xml)
  30. set (HTML_HELP_XSL ${CMAKE_CURRENT_BINARY_DIR}/resources/docbook-xsl/htmlhelp/htmlhelp.xsl)
  31. set (PORTAL_GEN_XSL ${CMAKE_CURRENT_BINARY_DIR}/BuildTools/PortalGen.xsl)
  32. if ( "${HPCC_MATURITY}" STREQUAL "release" )
  33. set (DOC_VERSION "${DOC_VERSION}-${HPCC_SEQUENCE}")
  34. set (DOC_VERSION_ONLY "${DOC_VERSION}")
  35. else()
  36. if (DOCTAG)
  37. set (DOC_VERSION "${majorver}-${minorver}-${DOCTAG}")
  38. string (REGEX REPLACE "-#.*" "" DOC_VERSION_ONLY ${DOC_VERSION})
  39. else()
  40. set (DOC_VERSION "${DOC_VERSION}-${HPCC_MATURITY}${HPCC_SEQUENCE}")
  41. set (DOC_VERSION_ONLY "${DOC_VERSION}")
  42. endif()
  43. endif()
  44. # Build image file list to add to source watch.
  45. #file(GLOB_RECURSE DOC_IMAGES_LIST images/*)
  46. # Required directories to add.
  47. add_subdirectory(common)
  48. add_subdirectory(BuildTools)
  49. add_subdirectory(resources)
  50. # Docs automation.
  51. # Must before each language dir since UsingConfigManager depends on it
  52. if (DOCS_AUTO)
  53. add_subdirectory(XMLGeneration)
  54. endif()
  55. # GHacked up to test for Int'l.
  56. #
  57. if (NOT DOC_LANGS)
  58. set(DOC_LANGS EN_US)
  59. endif()
  60. string(TOUPPER "${DOC_LANGS}" DOC_LANGS)
  61. if ( ${DOC_LANGS} STREQUAL "ALL" )
  62. set(DOC_LANGS "EN_US;PT_BR")
  63. endif ()
  64. foreach(LANG ${DOC_LANGS})
  65. if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LANG}")
  66. add_subdirectory("${LANG}")
  67. endif()
  68. endforeach()
  69. GET_PROPERTY(_targets GLOBAL PROPERTY DOC_TARGETS)
  70. add_custom_target(docs ALL DEPENDS ${_targets})