FindDOCBOOK.cmake 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. # - Try to find the xsltproc executable
  17. #
  18. # XSLTPROC_FOUND - system has the xsltproc executable.
  19. # XSLTPROC_EXECUTABLE - the runtime path of the xsltproc executable
  20. if (NOT XSLTPROC_FOUND)
  21. IF (WIN32)
  22. SET (xsltproc_n "xsltproc.exe")
  23. ELSE()
  24. SET (xsltproc_n "xsltproc")
  25. ENDIF()
  26. IF (NOT "${EXTERNALS_DIRECTORY}" STREQUAL "")
  27. IF (UNIX)
  28. IF (${ARCH64BIT} EQUAL 1)
  29. SET (osdir "linux64_gcc4.1.1")
  30. ELSE()
  31. SET (osdir "linux32_gcc4.1.1")
  32. ENDIF()
  33. ELSEIF(WIN32)
  34. SET (osdir "lib")
  35. ELSE()
  36. SET (osdir "unknown")
  37. ENDIF()
  38. IF (NOT ("${osdir}" STREQUAL "unknown"))
  39. FIND_PROGRAM(XSLTPROC_EXECUTABLE ${xsltproc_n} PATHS "${EXTERNALS_DIRECTORY}/xsltproc/${osdir}")
  40. ENDIF()
  41. ENDIF()
  42. if (USE_NATIVE_LIBRARIES)
  43. # if we didn't find in externals, look in system include path
  44. FIND_PROGRAM(XSLTPROC_EXECUTABLE ${xsltproc_n})
  45. endif()
  46. include(FindPackageHandleStandardArgs)
  47. find_package_handle_standard_args(XSLTPROC DEFAULT_MSG
  48. XSLTPROC_EXECUTABLE
  49. )
  50. MARK_AS_ADVANCED(XSLTPROC_EXECUTABLE)
  51. ENDIF()