2 # Find the native FLTK includes and library
\r
4 # FLTK_FLUID_EXE, where to find the Fluid tool
\r
5 # FLTK_WRAP_UI, This allows the FLTK_WRAP_UI command to work.
\r
6 # FLTK_INCLUDE_PATH, where to find include files
\r
7 # FLTK_LIBRARY, list of fltk libraries
\r
8 # FLTK_BASE_LIBRARY, the full path to fltk.lib
\r
9 # FLTK_GL_LIBRARY, the full path to fltk_gl.lib
\r
10 # FLTK_FORMS_LIBRARY, the full path to fltk_forms.lib
\r
13 OPTION(USE_FLTK_VERSION_1.0.11 "Use FLTK version 1.0.11" 1)
\r
15 OPTION(USE_FLTK_VERSION_1.1 "Use FLTK version 1.1" 0)
\r
17 # Exlusion between the two version
\r
18 IF(USE_FLTK_VERSION_1.0.11)
\r
19 SET(USE_FLTK_VERSION_1.1 0)
\r
20 ENDIF(USE_FLTK_VERSION_1.0.11)
\r
23 FIND_PATH(FLTK_INCLUDE_PATH FL/Fl.h
\r
31 # Make sure that the FLTK include path has been set
\r
32 # So the FLTK_LIBRARY does not appear the first time
\r
33 IF(FLTK_INCLUDE_PATH)
\r
34 IF(USE_FLTK_VERSION_1.0.11)
\r
35 FIND_LIBRARY(FLTK_BASE_LIBRARY fltk
\r
36 PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib H:/usr/local/fltk/lib /usr/X11R6/lib
\r
37 ${FLTK_INCLUDE_PATH}/lib
\r
39 ENDIF(USE_FLTK_VERSION_1.0.11)
\r
42 IF(USE_FLTK_VERSION_1.1)
\r
43 FIND_LIBRARY(FLTK_BASE_LIBRARY fltk
\r
44 PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib H:/usr/local/fltk/lib /usr/X11R6/lib
\r
45 ${FLTK_INCLUDE_PATH}/lib
\r
47 FIND_LIBRARY(FLTK_GL_LIBRARY fltkgl
\r
48 PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib H:/usr/local/fltk/lib /usr/X11R6/lib
\r
49 ${FLTK_INCLUDE_PATH}/lib
\r
51 FIND_LIBRARY(FLTK_FORMS_LIBRARY fltkforms
\r
52 PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib H:/usr/local/fltk/lib /usr/X11R6/lib
\r
53 ${FLTK_INCLUDE_PATH}/lib
\r
55 ENDIF(USE_FLTK_VERSION_1.1)
\r
57 SET( FLTK_LIBRARY ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY} ${FLTK_FORMS_LIBRARY} )
\r
59 ENDIF(FLTK_INCLUDE_PATH)
\r
62 FIND_FILE(FLTK_FLUID_EXE fluid
\r
63 ${path} ${FLTK_INCLUDE_PATH}/fluid
\r
66 # Enable the Wrap UI command
\r
68 SET ( FLTK_WRAP_UI 1 CACHE INTERNAL "Can we honour the FLTK_WRAP_UI command" )
\r
69 ENDIF (FLTK_FLUID_EXE)
\r
73 # This is the final flag that will be checked by
\r
74 # other code that requires FLTK for compile/run.
\r
77 IF(FLTK_INCLUDE_PATH)
\r
79 SET (HAS_FLTK 1 CACHE INTERNAL "FLTK library, headers and Fluid are available")
\r
81 ENDIF(FLTK_INCLUDE_PATH)
\r
82 ENDIF(FLTK_FLUID_EXE)
\r