FindFLTK.cmake 918 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # Find the native FLTK includes and library
  3. #
  4. # FLTK_FLUID_EXE, where to find the Fluid tool
  5. # FLTK_WRAP_UI, This allows the FLTK_WRAP_UI command to work.
  6. FIND_PATH(FLTK_INCLUDE_PATH FL/Fl.h
  7. /usr/local/include
  8. /usr/include
  9. /usr/local/fltk
  10. /usr/X11R6/include
  11. H:/usr/local/fltk
  12. )
  13. FIND_LIBRARY(FLTK_LIBRARY fltk
  14. PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib H:/usr/local/fltk/lib /usr/X11R6/lib
  15. )
  16. FIND_FILE(FLTK_FLUID_EXE fluid
  17. ${path}
  18. )
  19. IF (FLTK_FLUID_EXE)
  20. SET ( FLTK_WRAP_UI 1 CACHE INTERNAL "Can we honour the FLTK_WRAP_UI command" )
  21. ENDIF (FLTK_FLUID_EXE)
  22. #
  23. # Set HAS_FLTK
  24. # This is the final flag that will be checked by
  25. # other code that requires FLTK for compile/run.
  26. #
  27. IF(FLTK_FLUID_EXE)
  28. IF(FLTK_INCLUDE_PATH)
  29. IF(FLTK_LIBRARY)
  30. SET (HAS_FLTK 1 CACHE INTERNAL "FLTK library, headers and Fluid are available")
  31. ENDIF(FLTK_LIBRARY)
  32. ENDIF(FLTK_INCLUDE_PATH)
  33. ENDIF(FLTK_FLUID_EXE)