FindCABLE.cmake 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # This module finds if CABLE is installed and determines where the
  3. # include files and libraries are. This code sets the following variables:
  4. #
  5. # CABLE = the full path to the cable executable
  6. # CABLE_TCL_LIBRARY = the full path to the Tcl wrapper facility library
  7. # CABLE_ROOT = the full path to the root of the cable installation
  8. #
  9. # To build Tcl wrappers, you should add shared library and link it to
  10. # ${CABLE_TCL_LIBRARY}. You should also add ${CABLE_ROOT}/include as
  11. # an include directory.
  12. #
  13. # Use some tricks to find the cable executable relative to somewhere
  14. # in the system search path. CMake will collapse the relative paths
  15. # automatically.
  16. FIND_PROGRAM(CABLE
  17. NAMES cable
  18. ../share/Cable/bin/cable
  19. ../Cable/bin/cable
  20. PATHS /usr/share/Cable/bin
  21. /usr/local/share/Cable/bin
  22. "C:/Program Files/Cable/bin"
  23. )
  24. # Get the path where the executable sits, but without the executable
  25. # name on it.
  26. GET_FILENAME_COMPONENT(CABLE_ROOT_BIN ${CABLE} PATH)
  27. # Find the root of the CABLE installation based on the executable's
  28. # location.
  29. FIND_PATH(CABLE_ROOT include/wrapCalls.h ${CABLE_ROOT_BIN}/..)
  30. # Find the WrapTclFacility library in a path relative to the root of
  31. # the CABLE installation.
  32. FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES WrapTclFacility PATHS ${CABLE_ROOT}/lib)