1############################################################################ 2# FindQSA.txt 3# Copyright (C) 2014 Belledonne Communications, Grenoble France 4# 5############################################################################ 6# 7# This program is free software; you can redistribute it and/or 8# modify it under the terms of the GNU General Public License 9# as published by the Free Software Foundation; either version 2 10# of the License, or (at your option) any later version. 11# 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software 19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20# 21############################################################################ 22# 23# - Find the libscreen include file and library 24# 25# SCREEN_FOUND - system has libscreen 26# SCREEN_INCLUDE_DIRS - the libscreen include directory 27# SCREEN_LIBRARIES - The libraries needed to use libscreen 28 29include(CheckSymbolExists) 30include(CMakePushCheckState) 31 32set(_SCREEN_ROOT_PATHS 33 ${CMAKE_INSTALL_PREFIX} 34) 35 36find_path(SCREEN_INCLUDE_DIRS 37 NAMES screen/screen.h 38 HINTS _SCREEN_ROOT_PATHS 39 PATH_SUFFIXES include 40) 41 42find_library(SCREEN_LIBRARIES 43 NAMES screen 44 HINTS _SCREEN_ROOT_PATHS 45 PATH_SUFFIXES lib 46) 47 48if(SCREEN_LIBRARIES) 49 list(APPEND CMAKE_REQUIRED_INCLUDES ${SCREEN_INCLUDE_DIRS}) 50 list(APPEND CMAKE_REQUIRED_LIBRARIES ${SCREEN_LIBRARIES}) 51endif() 52 53include(FindPackageHandleStandardArgs) 54find_package_handle_standard_args(SCREEN 55 DEFAULT_MSG 56 SCREEN_INCLUDE_DIRS SCREEN_LIBRARIES 57) 58 59mark_as_advanced(SCREEN_INCLUDE_DIRS SCREEN_LIBRARIES) 60