2016-09-27 19:01:08 +00:00
|
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
|
|
|
2013-10-15 15:17:36 +00:00
|
|
|
#.rst:
|
|
|
|
# FindFLTK
|
|
|
|
# --------
|
2009-01-23 05:30:22 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# Find the FLTK library
|
2009-01-23 05:30:22 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# Input Variables
|
|
|
|
# ^^^^^^^^^^^^^^^
|
2009-01-23 05:30:22 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# By default this module will search for all of the FLTK components and
|
|
|
|
# add them to the FLTK_LIBRARIES variable. You can limit the components
|
|
|
|
# which get placed in FLTK_LIBRARIES by defining one or more of the
|
|
|
|
# following three options:
|
2009-01-23 05:30:22 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_SKIP_OPENGL``
|
|
|
|
# Set to true to disable searching for the FLTK GL library
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_SKIP_FORMS``
|
|
|
|
# Set to true to disable searching for the FLTK Forms library
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_SKIP_IMAGES``
|
|
|
|
# Set to true to disable searching for the FLTK Images library
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# FLTK is composed also by a binary tool. You can set the following option:
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_SKIP_FLUID``
|
|
|
|
# Set to true to not look for the FLUID binary
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# Result Variables
|
|
|
|
# ^^^^^^^^^^^^^^^^
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# The following variables will be defined:
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_FOUND``
|
|
|
|
# True if all components not skipped were found
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_INCLUDE_DIR``
|
|
|
|
# Path to the include directory for FLTK header files
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_LIBRARIES``
|
|
|
|
# List of the FLTK libraries found
|
2009-01-23 05:30:22 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_FLUID_EXECUTABLE``
|
|
|
|
# Path to the FLUID binary tool
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# ``FLTK_WRAP_UI``
|
|
|
|
# True if FLUID is found, used to enable the FLTK_WRAP_UI command
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# Cache Variables
|
|
|
|
# ^^^^^^^^^^^^^^^
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:39:58 +00:00
|
|
|
# The following cache variables are also available to set or use:
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:40:58 +00:00
|
|
|
# ``FLTK_BASE_LIBRARY_RELEASE``
|
|
|
|
# The FLTK base library (optimized)
|
2009-01-23 05:30:22 +00:00
|
|
|
#
|
2017-12-14 12:40:58 +00:00
|
|
|
# ``FLTK_BASE_LIBRARY_DEBUG``
|
|
|
|
# The FLTK base library (debug)
|
2009-01-23 05:30:22 +00:00
|
|
|
#
|
2017-12-14 12:40:58 +00:00
|
|
|
# ``FLTK_GL_LIBRARY_RELEASE``
|
|
|
|
# The FLTK GL library (optimized)
|
2013-10-15 15:17:36 +00:00
|
|
|
#
|
2017-12-14 12:40:58 +00:00
|
|
|
# ``FLTK_GL_LIBRARY_DEBUG``
|
|
|
|
# The FLTK GL library (debug)
|
|
|
|
#
|
|
|
|
# ``FLTK_FORMS_LIBRARY_RELEASE``
|
|
|
|
# The FLTK Forms library (optimized)
|
|
|
|
#
|
|
|
|
# ``FLTK_FORMS_LIBRARY_DEBUG``
|
|
|
|
# The FLTK Forms library (debug)
|
|
|
|
#
|
|
|
|
# ``FLTK_IMAGES_LIBRARY_RELEASE``
|
|
|
|
# The FLTK Images protobuf library (optimized)
|
|
|
|
#
|
|
|
|
# ``FLTK_IMAGES_LIBRARY_DEBUG``
|
|
|
|
# The FLTK Images library (debug)
|
2009-01-23 05:30:22 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
if(NOT FLTK_SKIP_OPENGL)
|
|
|
|
find_package(OpenGL)
|
|
|
|
endif()
|
2009-01-22 04:52:37 +00:00
|
|
|
|
2005-12-14 18:51:08 +00:00
|
|
|
# Platform dependent libraries required by FLTK
|
2012-08-13 17:47:32 +00:00
|
|
|
if(WIN32)
|
|
|
|
if(NOT CYGWIN)
|
|
|
|
if(BORLAND)
|
|
|
|
set( FLTK_PLATFORM_DEPENDENT_LIBS import32 )
|
2012-08-13 17:50:14 +00:00
|
|
|
else()
|
2012-08-13 17:47:32 +00:00
|
|
|
set( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
2012-08-13 17:47:32 +00:00
|
|
|
|
|
|
|
if(UNIX)
|
2012-11-03 20:35:44 +00:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake)
|
2012-08-13 17:47:32 +00:00
|
|
|
find_library(FLTK_MATH_LIBRARY m)
|
|
|
|
set( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY})
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2012-08-13 17:47:32 +00:00
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
set( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2003-01-16 18:24:49 +00:00
|
|
|
|
2005-07-06 19:25:21 +00:00
|
|
|
# If FLTK_INCLUDE_DIR is already defined we assigne its value to FLTK_DIR
|
2012-08-13 17:47:32 +00:00
|
|
|
if(FLTK_INCLUDE_DIR)
|
|
|
|
set(FLTK_DIR ${FLTK_INCLUDE_DIR})
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2002-09-02 21:34:45 +00:00
|
|
|
|
|
|
|
|
2005-07-06 19:25:21 +00:00
|
|
|
# If FLTK has been built using CMake we try to find everything directly
|
2012-08-13 17:47:32 +00:00
|
|
|
set(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.")
|
2005-07-06 19:25:21 +00:00
|
|
|
|
|
|
|
# Search only if the location is not already known.
|
2012-08-13 17:47:32 +00:00
|
|
|
if(NOT FLTK_DIR)
|
2005-07-06 19:25:21 +00:00
|
|
|
# Get the system search path as a list.
|
2012-08-13 17:47:32 +00:00
|
|
|
file(TO_CMAKE_PATH "$ENV{PATH}" FLTK_DIR_SEARCH2)
|
2005-07-06 19:25:21 +00:00
|
|
|
|
|
|
|
# Construct a set of paths relative to the system search path.
|
2012-08-13 17:47:32 +00:00
|
|
|
set(FLTK_DIR_SEARCH "")
|
|
|
|
foreach(dir ${FLTK_DIR_SEARCH2})
|
|
|
|
set(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk")
|
2012-08-13 17:50:14 +00:00
|
|
|
endforeach()
|
2012-08-13 17:47:32 +00:00
|
|
|
string(REPLACE "//" "/" FLTK_DIR_SEARCH "${FLTK_DIR_SEARCH}")
|
2005-07-06 19:25:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Look for an installation or build tree.
|
|
|
|
#
|
2012-08-13 17:47:32 +00:00
|
|
|
find_path(FLTK_DIR FLTKConfig.cmake
|
2005-07-06 19:25:21 +00:00
|
|
|
# Look for an environment variable FLTK_DIR.
|
2012-03-28 22:00:54 +00:00
|
|
|
HINTS
|
|
|
|
ENV FLTK_DIR
|
2005-07-06 19:25:21 +00:00
|
|
|
|
|
|
|
# Look in places relative to the system executable search path.
|
|
|
|
${FLTK_DIR_SEARCH}
|
|
|
|
|
2017-11-20 15:29:25 +00:00
|
|
|
PATH_SUFFIXES
|
|
|
|
fltk
|
|
|
|
fltk/include
|
|
|
|
lib/fltk
|
|
|
|
lib/fltk/include
|
2005-07-06 19:25:21 +00:00
|
|
|
|
|
|
|
# Help the user find it if we cannot.
|
|
|
|
DOC "The ${FLTK_DIR_STRING}"
|
|
|
|
)
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2005-07-06 19:25:21 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
# Check if FLTK was built using CMake
|
|
|
|
if(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)
|
|
|
|
set(FLTK_BUILT_WITH_CMAKE 1)
|
|
|
|
endif()
|
2005-07-06 19:25:21 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
if(FLTK_BUILT_WITH_CMAKE)
|
|
|
|
set(FLTK_FOUND 1)
|
|
|
|
include(${FLTK_DIR}/FLTKConfig.cmake)
|
2005-07-06 19:25:21 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
# Fluid
|
|
|
|
if(FLUID_COMMAND)
|
|
|
|
set(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable")
|
2012-08-13 17:50:14 +00:00
|
|
|
else()
|
2017-12-14 12:38:05 +00:00
|
|
|
find_program(FLTK_FLUID_EXECUTABLE fluid PATHS
|
|
|
|
${FLTK_EXECUTABLE_DIRS}
|
|
|
|
${FLTK_EXECUTABLE_DIRS}/RelWithDebInfo
|
|
|
|
${FLTK_EXECUTABLE_DIRS}/Debug
|
|
|
|
${FLTK_EXECUTABLE_DIRS}/Release
|
|
|
|
NO_SYSTEM_PATH)
|
|
|
|
endif()
|
|
|
|
# mark_as_advanced(FLTK_FLUID_EXECUTABLE)
|
|
|
|
|
|
|
|
set(FLTK_INCLUDE_DIR ${FLTK_DIR})
|
|
|
|
link_directories(${FLTK_LIBRARY_DIRS})
|
|
|
|
|
|
|
|
set(FLTK_BASE_LIBRARY fltk)
|
|
|
|
set(FLTK_GL_LIBRARY fltk_gl)
|
|
|
|
set(FLTK_FORMS_LIBRARY fltk_forms)
|
|
|
|
set(FLTK_IMAGES_LIBRARY fltk_images)
|
|
|
|
|
|
|
|
# Add the extra libraries
|
|
|
|
load_cache(${FLTK_DIR}
|
|
|
|
READ_WITH_PREFIX
|
|
|
|
FL FLTK_USE_SYSTEM_JPEG
|
|
|
|
FL FLTK_USE_SYSTEM_PNG
|
|
|
|
FL FLTK_USE_SYSTEM_ZLIB
|
|
|
|
)
|
2005-07-06 19:25:21 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
set(FLTK_IMAGES_LIBS "")
|
|
|
|
if(FLFLTK_USE_SYSTEM_JPEG)
|
|
|
|
set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_jpeg)
|
|
|
|
endif()
|
|
|
|
if(FLFLTK_USE_SYSTEM_PNG)
|
|
|
|
set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_png)
|
|
|
|
endif()
|
|
|
|
if(FLFLTK_USE_SYSTEM_ZLIB)
|
|
|
|
set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_zlib)
|
|
|
|
endif()
|
|
|
|
set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL
|
|
|
|
"Extra libraries for fltk_images library.")
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
|
|
|
# if FLTK was not built using CMake
|
|
|
|
# Find fluid executable.
|
|
|
|
find_program(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid)
|
|
|
|
|
|
|
|
# Use location of fluid to help find everything else.
|
|
|
|
set(FLTK_INCLUDE_SEARCH_PATH "")
|
|
|
|
set(FLTK_LIBRARY_SEARCH_PATH "")
|
|
|
|
if(FLTK_FLUID_EXECUTABLE)
|
|
|
|
get_filename_component(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH)
|
|
|
|
set(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
|
|
|
|
${FLTK_BIN_DIR}/../include ${FLTK_BIN_DIR}/..)
|
|
|
|
set(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
|
|
|
|
${FLTK_BIN_DIR}/../lib)
|
|
|
|
set(FLTK_WRAP_UI 1)
|
|
|
|
endif()
|
2005-07-06 19:25:21 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
#
|
|
|
|
# Try to find FLTK include dir using fltk-config
|
|
|
|
#
|
|
|
|
if(UNIX)
|
|
|
|
# Use fltk-config to generate a list of possible include directories
|
|
|
|
find_program(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR})
|
|
|
|
if(FLTK_CONFIG_SCRIPT)
|
|
|
|
if(NOT FLTK_INCLUDE_DIR)
|
|
|
|
exec_program(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS)
|
|
|
|
if(FLTK_CXXFLAGS)
|
|
|
|
string(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS})
|
|
|
|
string(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}")
|
|
|
|
foreach(_dir ${_fltk_temp_dirs})
|
|
|
|
string(STRIP ${_dir} _output)
|
|
|
|
list(APPEND _FLTK_POSSIBLE_INCLUDE_DIRS ${_output})
|
|
|
|
endforeach()
|
2012-08-13 17:47:32 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
2017-12-14 12:38:05 +00:00
|
|
|
endif()
|
2012-08-13 17:47:32 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
list(APPEND FLTK_INCLUDE_SEARCH_PATH ${_FLTK_POSSIBLE_INCLUDE_DIRS})
|
2002-09-05 16:00:45 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
find_path(FLTK_INCLUDE_DIR
|
|
|
|
NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376)
|
|
|
|
PATH_SUFFIXES fltk fltk/include
|
|
|
|
PATHS ${FLTK_INCLUDE_SEARCH_PATH})
|
2012-08-13 17:42:58 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
#
|
|
|
|
# Try to find FLTK library
|
|
|
|
if(UNIX)
|
|
|
|
if(FLTK_CONFIG_SCRIPT)
|
|
|
|
exec_program(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS)
|
|
|
|
if(_FLTK_POSSIBLE_LIBS)
|
|
|
|
get_filename_component(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH)
|
2012-08-13 17:47:32 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
2017-12-14 12:38:05 +00:00
|
|
|
endif()
|
2012-08-13 17:47:32 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
list(APPEND FLTK_LIBRARY_SEARCH_PATH ${FLTK_INCLUDE_DIR}/lib ${_FLTK_POSSIBLE_LIBRARY_DIR})
|
|
|
|
|
2017-12-14 12:40:58 +00:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
|
|
|
|
|
|
|
# Allow libraries to be set manually
|
|
|
|
if(NOT FLTK_BASE_LIBRARY)
|
|
|
|
find_library(FLTK_BASE_LIBRARY_RELEASE NAMES fltk PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
find_library(FLTK_BASE_LIBRARY_DEBUG NAMES fltkd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
select_library_configurations(FLTK_BASE)
|
|
|
|
endif()
|
|
|
|
if(NOT FLTK_GL_LIBRARY)
|
|
|
|
find_library(FLTK_GL_LIBRARY_RELEASE NAMES fltkgl fltk_gl PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
find_library(FLTK_GL_LIBRARY_DEBUG NAMES fltkgld fltk_gld PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
select_library_configurations(FLTK_GL)
|
|
|
|
endif()
|
|
|
|
if(NOT FLTK_FORMS_LIBRARY)
|
|
|
|
find_library(FLTK_FORMS_LIBRARY_RELEASE NAMES fltkforms fltk_forms PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
find_library(FLTK_FORMS_LIBRARY_DEBUG NAMES fltkformsd fltk_formsd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
select_library_configurations(FLTK_FORMS)
|
|
|
|
endif()
|
|
|
|
if(NOT FLTK_IMAGES_LIBRARY)
|
|
|
|
find_library(FLTK_IMAGES_LIBRARY_RELEASE NAMES fltkimages fltk_images PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
find_library(FLTK_IMAGES_LIBRARY_DEBUG NAMES fltkimagesd fltk_imagesd PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
|
|
|
|
select_library_configurations(FLTK_IMAGES)
|
|
|
|
endif()
|
2017-12-14 12:38:05 +00:00
|
|
|
|
|
|
|
# Find the extra libraries needed for the fltk_images library.
|
|
|
|
if(UNIX)
|
|
|
|
if(FLTK_CONFIG_SCRIPT)
|
|
|
|
exec_program(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags
|
|
|
|
OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS)
|
|
|
|
set(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*")
|
|
|
|
if("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}")
|
|
|
|
string(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${CMAKE_MATCH_1}")
|
|
|
|
# The EXEC_PROGRAM will not be inherited into subdirectories from
|
|
|
|
# the file that originally included this module. Save the answer.
|
|
|
|
set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL
|
|
|
|
"Extra libraries for fltk_images library.")
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
2005-07-06 19:25:21 +00:00
|
|
|
|
2017-12-14 12:38:05 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Append all of the required libraries together (by default, everything)
|
|
|
|
set(FLTK_LIBRARIES)
|
|
|
|
if(NOT FLTK_SKIP_IMAGES)
|
|
|
|
list(APPEND FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY})
|
|
|
|
endif()
|
|
|
|
if(NOT FLTK_SKIP_FORMS)
|
|
|
|
list(APPEND FLTK_LIBRARIES ${FLTK_FORMS_LIBRARY})
|
|
|
|
endif()
|
|
|
|
if(NOT FLTK_SKIP_OPENGL)
|
|
|
|
list(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY})
|
|
|
|
list(APPEND FLTK_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
|
|
|
|
list(REMOVE_DUPLICATES FLTK_INCLUDE_DIR)
|
|
|
|
endif()
|
|
|
|
list(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY})
|
2012-08-13 17:47:32 +00:00
|
|
|
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
|
|
|
if(FLTK_SKIP_FLUID)
|
2009-01-23 05:30:22 +00:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR)
|
2012-08-13 17:47:32 +00:00
|
|
|
else()
|
2009-01-23 05:30:22 +00:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR FLTK_FLUID_EXECUTABLE)
|
2012-08-13 17:47:32 +00:00
|
|
|
endif()
|
2009-01-22 04:52:37 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
if(FLTK_FOUND)
|
|
|
|
if(APPLE)
|
|
|
|
set(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS} ${FLTK_LIBRARIES})
|
2012-08-13 17:50:14 +00:00
|
|
|
else()
|
2012-08-13 17:47:32 +00:00
|
|
|
set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS})
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2005-07-06 19:25:21 +00:00
|
|
|
|
|
|
|
# The following deprecated settings are for compatibility with CMake 1.4
|
2012-08-13 17:47:32 +00:00
|
|
|
set (HAS_FLTK ${FLTK_FOUND})
|
|
|
|
set (FLTK_INCLUDE_PATH ${FLTK_INCLUDE_DIR})
|
|
|
|
set (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE})
|
|
|
|
set (FLTK_LIBRARY ${FLTK_LIBRARIES})
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|