CMake: test option compatibility: Pango requires Xft.
Abort CMake configuration/generation if Xft is disabled or not found but Pango is requested because Pango requires Xft support. A detailed warning message is issued before the CMake generation is aborted. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12631 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
7aef0cad39
commit
baffc84fa1
@ -393,6 +393,21 @@ if(X11_Xft_FOUND)
|
||||
option(OPTION_USE_PANGO "use lib Pango" OFF)
|
||||
endif(X11_Xft_FOUND)
|
||||
|
||||
# test option compatibility: Pango requires Xft
|
||||
if (OPTION_USE_PANGO)
|
||||
if (NOT X11_Xft_FOUND)
|
||||
message(STATUS "Pango requires Xft but Xft library or headers could not be found.")
|
||||
message(STATUS "Please install Xft development files and try again or disable OPTION_USE_PANGO.")
|
||||
message(FATAL_ERROR "*** Aborting ***")
|
||||
else ()
|
||||
if (NOT OPTION_USE_XFT)
|
||||
message(STATUS "Pango requires Xft but usage of Xft was disabled.")
|
||||
message(STATUS "Please enable OPTION_USE_XFT and try again or disable OPTION_USE_PANGO.")
|
||||
message(FATAL_ERROR "*** Aborting ***")
|
||||
endif (NOT OPTION_USE_XFT)
|
||||
endif (NOT X11_Xft_FOUND)
|
||||
endif (OPTION_USE_PANGO)
|
||||
|
||||
#######################################################################
|
||||
if(X11_Xft_FOUND AND OPTION_USE_PANGO)
|
||||
#this covers Debian, Ubuntu, FreeBSD, NetBSD, Darwin
|
||||
@ -414,17 +429,17 @@ if(X11_Xft_FOUND AND OPTION_USE_PANGO)
|
||||
endif(HAVE_PANGO_H AND HAVE_PANGOXFT_H)
|
||||
if(HAVE_LIB_PANGO AND HAVE_LIB_PANGOXFT AND HAVE_LIB_GOBJECT)
|
||||
set(USE_PANGO TRUE)
|
||||
message(STATUS "USE_PANGO=" ${USE_PANGO})
|
||||
#remove last 3 components of HAVE_PANGO_H and put in PANGO_H_PREFIX
|
||||
# message(STATUS "USE_PANGO=" ${USE_PANGO})
|
||||
# remove last 3 components of HAVE_PANGO_H and put in PANGO_H_PREFIX
|
||||
get_filename_component(PANGO_H_PREFIX ${HAVE_PANGO_H} PATH)
|
||||
get_filename_component(PANGO_H_PREFIX ${PANGO_H_PREFIX} PATH)
|
||||
get_filename_component(PANGO_H_PREFIX ${PANGO_H_PREFIX} PATH)
|
||||
|
||||
get_filename_component(PANGOLIB_DIR ${HAVE_LIB_PANGO} PATH)
|
||||
#glib.h is usually in ${PANGO_H_PREFIX}/glib-2.0/ ...
|
||||
# glib.h is usually in ${PANGO_H_PREFIX}/glib-2.0/ ...
|
||||
find_path(GLIB_H_PATH glib.h ${PANGO_H_PREFIX}/glib-2.0)
|
||||
if(NOT GLIB_H_PATH) # ... but not under NetBSD
|
||||
find_path(GLIB_H_PATH glib.h ${PANGO_H_PREFIX}/glib/glib-2.0)
|
||||
find_path(GLIB_H_PATH glib.h ${PANGO_H_PREFIX}/glib/glib-2.0)
|
||||
endif(NOT GLIB_H_PATH)
|
||||
include_directories(${PANGO_H_PREFIX}/pango-1.0 ${GLIB_H_PATH} ${PANGOLIB_DIR}/glib-2.0/include)
|
||||
endif(HAVE_LIB_PANGO AND HAVE_LIB_PANGOXFT AND HAVE_LIB_GOBJECT)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user