1
# Find vga-related library information for Linux
3
# This module defines the following uncached variables:
4
# VGA_FOUND, if false, do not try to use VGA.
5
# VGA_INCLUDE_DIRS, where to find vga.h.
6
# VGA_LIBRARIES, the libraries to link against to use the vga library
7
# VGA_LIBRARY_DIRS, the directory where the vga library is found.
9
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
10
find_path(VGA_INCLUDE_DIR vga.h /usr/local/include /usr/include)
13
find_library(VGA_LIBRARY
15
PATHS /usr/local/lib /usr/lib
18
set(VGA_LIBRARY_DIR "")
19
get_filename_component(VGA_LIBRARY_DIRS ${VGA_LIBRARY} PATH)
20
# Set uncached variables as per standard.
22
set(VGA_INCLUDE_DIRS ${VGA_INCLUDE_DIR})
23
set(VGA_LIBRARIES ${VGA_LIBRARY})
25
endif(VGA_INCLUDE_DIR)
28
if(NOT VGA_FIND_QUIETLY)
29
message(STATUS "FindVGA: Found both vga.h and the vga library")
30
endif(NOT VGA_FIND_QUIETLY)
33
message(FATAL_ERROR "FindVGA: Could not find vga.h and/or the vga library")
34
endif(VGA_FIND_REQUIRED)
36
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")