~uhh-ssd/+junk/humidity_readout

« back to all changes in this revision

Viewing changes to plplot/plplot-5.9.9/cmake/modules/FindVGA.cmake

  • Committer: Joachim Erfle
  • Date: 2013-07-24 13:53:41 UTC
  • Revision ID: joachim.erfle@desy.de-20130724135341-1qojpp701zsn009p
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Find vga-related library information for Linux
 
2
 
 
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.
 
8
 
 
9
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 
10
find_path(VGA_INCLUDE_DIR vga.h /usr/local/include /usr/include)
 
11
 
 
12
if(VGA_INCLUDE_DIR)
 
13
  find_library(VGA_LIBRARY
 
14
  NAMES vga
 
15
  PATHS /usr/local/lib /usr/lib
 
16
  )
 
17
  if(VGA_LIBRARY)
 
18
    set(VGA_LIBRARY_DIR "")
 
19
    get_filename_component(VGA_LIBRARY_DIRS ${VGA_LIBRARY} PATH)
 
20
    # Set uncached variables as per standard.
 
21
    set(VGA_FOUND ON)
 
22
    set(VGA_INCLUDE_DIRS ${VGA_INCLUDE_DIR})
 
23
    set(VGA_LIBRARIES ${VGA_LIBRARY})
 
24
  endif(VGA_LIBRARY)
 
25
endif(VGA_INCLUDE_DIR)
 
26
            
 
27
if(VGA_FOUND)
 
28
  if(NOT VGA_FIND_QUIETLY)
 
29
    message(STATUS "FindVGA: Found both vga.h and the vga library")
 
30
  endif(NOT VGA_FIND_QUIETLY)
 
31
else(VGA_FOUND)
 
32
  if(VGA_FIND_REQUIRED)
 
33
    message(FATAL_ERROR "FindVGA: Could not find vga.h and/or the vga library")
 
34
  endif(VGA_FIND_REQUIRED)
 
35
endif(VGA_FOUND)
 
36
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")