2019-01-03 14:25:58 +00:00
|
|
|
# * Find the Xinerama include file and library
|
2015-12-01 12:53:43 +00:00
|
|
|
#
|
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
set(Xinerama_INC_SEARCH_PATH
|
2015-12-01 12:53:43 +00:00
|
|
|
/usr/X11R6/include
|
|
|
|
/usr/local/include
|
|
|
|
/usr/include/X11
|
|
|
|
/usr/openwin/include
|
|
|
|
/usr/openwin/share/include
|
|
|
|
/opt/graphics/OpenGL/include
|
|
|
|
/usr/include)
|
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
set(Xinerama_LIB_SEARCH_PATH
|
2015-12-01 12:53:43 +00:00
|
|
|
/usr/X11R6/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/openwin/lib
|
|
|
|
/usr/lib)
|
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
find_path(Xinerama_INCLUDE_DIR X11/extensions/Xinerama.h
|
2015-12-01 12:53:43 +00:00
|
|
|
${Xinerama_INC_SEARCH_PATH})
|
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
find_library(Xinerama_LIBRARIES NAMES Xinerama PATH ${Xinerama_LIB_SEARCH_PATH})
|
2015-12-01 12:53:43 +00:00
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
if(Xinerama_INCLUDE_DIR AND Xinerama_LIBRARIES)
|
|
|
|
set(Xinerama_FOUND TRUE)
|
|
|
|
endif(Xinerama_INCLUDE_DIR AND Xinerama_LIBRARIES)
|
2015-12-01 12:53:43 +00:00
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
if(Xinerama_FOUND)
|
|
|
|
include(CheckLibraryExists)
|
2015-12-01 12:53:43 +00:00
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
check_library_exists(${Xinerama_LIBRARIES}
|
|
|
|
"XineramaQueryScreens"
|
|
|
|
${Xinerama_LIBRARIES}
|
|
|
|
Xinerama_HAS_QUERY)
|
2015-12-01 12:53:43 +00:00
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
if(NOT Xinerama_HAS_QUERY AND Xinerama_FIND_REQUIRED)
|
|
|
|
message(FATAL_ERROR "Could NOT find Xinerama")
|
|
|
|
endif(NOT Xinerama_HAS_QUERY AND Xinerama_FIND_REQUIRED)
|
|
|
|
endif(Xinerama_FOUND)
|
2015-12-01 12:53:43 +00:00
|
|
|
|
2019-01-03 14:25:58 +00:00
|
|
|
mark_as_advanced(Xinerama_INCLUDE_DIR Xinerama_LIBRARIES)
|