2002-09-03 01:34:45 +04:00
|
|
|
#
|
|
|
|
# Find the native FLTK includes and library
|
|
|
|
#
|
|
|
|
# The following settings are defined
|
|
|
|
# FLTK_FLUID_EXECUTABLE, where to find the Fluid tool
|
|
|
|
# FLTK_WRAP_UI, This allows the FLTK_WRAP_UI command to work.
|
|
|
|
# FLTK_INCLUDE_DIR, where to find include files
|
|
|
|
# FLTK_LIBRARIES, list of fltk libraries
|
2002-09-05 20:00:45 +04:00
|
|
|
# FLTK_VERSION_1.0.11 Use this Version
|
|
|
|
# FLTK_VERSION_1.1 Use this Version
|
2002-09-03 01:34:45 +04:00
|
|
|
# FLTK_FOUND, Don't use FLTK if false.
|
|
|
|
|
|
|
|
|
|
|
|
# The following settings should not be used in general.
|
2002-12-03 21:46:45 +03:00
|
|
|
# FLTK_BASE_LIBRARY = the full path to fltk.lib
|
|
|
|
# FLTK_GL_LIBRARY = the full path to fltk_gl.lib
|
|
|
|
# FLTK_FORMS_LIBRARY = the full path to fltk_forms.lib
|
|
|
|
# FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib
|
2002-09-03 01:34:45 +04:00
|
|
|
|
2002-10-01 06:26:47 +04:00
|
|
|
OPTION(FLTK_VERSION_1.1 "Use FLTK version 1.1" 1)
|
|
|
|
OPTION(FLTK_VERSION_1.0.11 "Use FLTK version 1.0.11" 0)
|
2002-09-03 01:34:45 +04:00
|
|
|
|
|
|
|
# Exclusion between the two version
|
|
|
|
|
2002-10-01 06:26:47 +04:00
|
|
|
IF(FLTK_VERSION_1.1)
|
|
|
|
SET(FLTK_VERSION_1.0.11 0)
|
|
|
|
ENDIF(FLTK_VERSION_1.1)
|
2002-09-03 01:34:45 +04:00
|
|
|
|
|
|
|
FIND_PATH(FLTK_INCLUDE_DIR FL/Fl.h
|
|
|
|
/usr/local/include
|
|
|
|
/usr/include
|
|
|
|
/usr/local/fltk
|
|
|
|
/usr/X11R6/include
|
|
|
|
)
|
|
|
|
|
|
|
|
# Platform dependent libraries required by FLTK
|
|
|
|
|
|
|
|
IF(WIN32)
|
2003-01-16 20:38:53 +03:00
|
|
|
IF(NOT CYGWIN)
|
|
|
|
IF(BORLAND)
|
|
|
|
SET( FLTK_PLATFORM_DEPENDENT_LIBS import32 )
|
|
|
|
ELSE(BORLAND)
|
|
|
|
SET( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
|
|
|
|
ENDIF(BORLAND)
|
|
|
|
ENDIF(NOT CYGWIN)
|
2002-09-03 01:34:45 +04:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
IF(UNIX)
|
2003-02-20 01:10:08 +03:00
|
|
|
INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake)
|
|
|
|
SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm)
|
2002-09-03 01:34:45 +04:00
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2003-01-16 21:24:49 +03:00
|
|
|
IF(APPLE)
|
2003-01-16 21:31:35 +03:00
|
|
|
SET( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
|
2003-01-16 21:24:49 +03:00
|
|
|
ENDIF(APPLE)
|
|
|
|
|
2002-09-03 01:34:45 +04:00
|
|
|
# Make sure that the FLTK include path has been set
|
|
|
|
# So the FLTK_LIBRARY does not appear the first time
|
|
|
|
IF(FLTK_INCLUDE_DIR)
|
2002-09-05 20:00:45 +04:00
|
|
|
IF(FLTK_VERSION_1.0.11)
|
2002-09-03 01:34:45 +04:00
|
|
|
FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd
|
|
|
|
PATHS /usr/lib /usr/local/lib
|
|
|
|
/usr/local/fltk/lib
|
|
|
|
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
|
|
|
|
)
|
2002-09-05 20:00:45 +04:00
|
|
|
ENDIF(FLTK_VERSION_1.0.11)
|
|
|
|
IF(FLTK_VERSION_1.1)
|
2002-09-03 01:34:45 +04:00
|
|
|
FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd
|
|
|
|
PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib
|
|
|
|
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
|
|
|
|
)
|
|
|
|
FIND_LIBRARY(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl
|
|
|
|
PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib
|
|
|
|
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
|
|
|
|
)
|
|
|
|
FIND_LIBRARY(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms
|
|
|
|
PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib
|
|
|
|
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
|
|
|
|
)
|
|
|
|
FIND_LIBRARY(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images
|
|
|
|
PATHS /usr/lib /usr/local/lib /usr/local/fltk/lib
|
|
|
|
/usr/X11R6/lib ${FLTK_INCLUDE_DIR}/lib
|
|
|
|
)
|
2002-09-05 20:00:45 +04:00
|
|
|
ENDIF(FLTK_VERSION_1.1)
|
2002-09-03 01:34:45 +04:00
|
|
|
SET( FLTK_LIBRARIES ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY}
|
|
|
|
${FLTK_FORMS_LIBRARY} ${FLTK_IMAGES_LIBRARY} ${FLTK_PLATFORM_DEPENDENT_LIBS}
|
|
|
|
)
|
|
|
|
ENDIF(FLTK_INCLUDE_DIR)
|
|
|
|
# Find Fluid
|
2003-01-28 23:44:45 +03:00
|
|
|
FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid
|
2002-09-03 01:34:45 +04:00
|
|
|
${path} ${FLTK_INCLUDE_DIR}/fluid
|
|
|
|
)
|
|
|
|
# Enable the Wrap UI command
|
|
|
|
IF (FLTK_FLUID_EXECUTABLE)
|
|
|
|
SET ( FLTK_WRAP_UI 1 CACHE INTERNAL "Can we honour the FLTK_WRAP_UI command" )
|
|
|
|
ENDIF (FLTK_FLUID_EXECUTABLE)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Set FLTK_FOUND
|
|
|
|
# This is the final flag that will be checked by
|
|
|
|
# other code that requires FLTK for compile/run.
|
|
|
|
#
|
|
|
|
|
|
|
|
IF(FLTK_FLUID_EXECUTABLE)
|
|
|
|
IF(FLTK_INCLUDE_DIR)
|
|
|
|
IF(FLTK_LIBRARIES)
|
|
|
|
|
|
|
|
# The fact that it is in the cache is deprecated.
|
|
|
|
SET (FLTK_FOUND 1 CACHE INTERNAL "FLTK library, headers and Fluid are available")
|
|
|
|
|
|
|
|
# The following deprecated settings are for compatibility with CMake 1.4
|
|
|
|
SET (HAS_FLTK ${FLTK_FOUND})
|
|
|
|
SET (FLTK_INCLUDE_PATH ${FLTK_INCLUDE_DIR})
|
|
|
|
SET (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE})
|
|
|
|
SET (FLTK_LIBRARY ${FLTK_LIBRARIES})
|
|
|
|
ENDIF(FLTK_LIBRARIES)
|
|
|
|
ENDIF(FLTK_INCLUDE_DIR)
|
2002-09-05 20:00:45 +04:00
|
|
|
ENDIF(FLTK_FLUID_EXECUTABLE)
|
|
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
FLTK_VERSION_1.0.11
|
|
|
|
FLTK_VERSION_1.1
|
|
|
|
)
|