FindSAXON.cmake 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. # SAXON_FOUND - system has the saxon executable.
  19. # SAXON_EXECUTABLE - the runtime path of the saxon executable
  20. if (NOT SAXON_FOUND)
  21. IF (WIN32)
  22. SET (saxon "transform.exe")
  23. ELSE()
  24. SET (saxon "saxonb-xslt")
  25. ENDIF()
  26. IF (NOT "${EXTERNALS_DIRECTORY}" STREQUAL "")
  27. FIND_PROGRAM(SAXON_EXECUTABLE ${saxon} PATHS "${EXTERNALS_DIRECTORY}")
  28. ENDIF()
  29. if (USE_NATIVE_LIBRARIES)
  30. # if we didn't find in externals, look in system include path
  31. FIND_PROGRAM(SAXON_EXECUTABLE ${saxon})
  32. endif()
  33. include(FindPackageHandleStandardArgs)
  34. find_package_handle_standard_args(SAXON DEFAULT_MSG
  35. SAXON_EXECUTABLE
  36. )
  37. MARK_AS_ADVANCED(SAXON_EXECUTABLE)
  38. ENDIF()