CMakeLists.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. if ( "${HPCC_MATURITY}" STREQUAL "release" )
  32. set (DOC_VERSION "${DOC_VERSION}-${HPCC_SEQUENCE}")
  33. else()
  34. set (DOC_VERSION "${DOC_VERSION}-${HPCC_MATURITY}${HPCC_SEQUENCE}")
  35. endif()
  36. # Build image file list to add to source watch.
  37. #file(GLOB_RECURSE DOC_IMAGES_LIST images/*)
  38. # Required directories to add.
  39. add_subdirectory(common)
  40. add_subdirectory(BuildTools)
  41. add_subdirectory(resources)
  42. # Docs automation.
  43. # Must before each language dir since UsingConfigManager depends on it
  44. if (DOCS_AUTO)
  45. add_subdirectory(XMLGeneration)
  46. endif()
  47. # GHacked up to test for Int'l.
  48. #
  49. if (NOT DOC_LANGS)
  50. set(DOC_LANGS EN_US)
  51. endif()
  52. string(TOUPPER "${DOC_LANGS}" DOC_LANGS)
  53. if ( ${DOC_LANGS} STREQUAL "ALL" )
  54. set(DOC_LANGS "EN_US;PT_BR")
  55. endif ()
  56. foreach(LANG ${DOC_LANGS})
  57. if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LANG}")
  58. add_subdirectory("${LANG}")
  59. endif()
  60. endforeach()
  61. GET_PROPERTY(_targets GLOBAL PROPERTY DOC_TARGETS)
  62. add_custom_target(docs ALL DEPENDS ${_targets})