File: psttf.cmake

package info (click to toggle)
plplot 5.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,280 kB
  • ctags: 13,512
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,210; makefile: 199; lisp: 75; sed: 25; fortran: 7
file content (81 lines) | stat: -rw-r--r-- 3,233 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# cmake/modules/psttf.cmake
#
# Copyright (C) 2006  Alan W. Irwin
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; version 2 of the License.
#
# PLplot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the file PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

# Configuration for the psttf device driver (supporting the psttf and 
# psttfc devices).
#
# The following variables are set / modified
#
# PLD_psttf               - ON means the psttf and psttfc devices are enabled.
# psttf_COMPILE_FLAGS  	  - blank-separated COMPILE_FLAGS required to
#			    compile psttf device driver.
# psttf_LINK_FLAGS     	  - list of LINK_FLAGS for dynamic psttf device driver.
# psttf_RPATH	       	  - RPATH directory list for psttf device driver.
# DRIVERS_LINK_FLAGS  	  - list of device LINK_FLAGS and TARGETS for case
# 			    when ENABLE_DYNDRIVERS OFF.

# Include file searches use FindPath. To add extra search directories
# set the environment variable CMAKE_INCLUDE_PATH.
# Library searches use FindLibrary. To add extra search directories
# set the environment variable CMAKE_LIBRARY_PATH.
# See cmake documentation for further details.

if(PLD_psttf)
  if(NOT CMAKE_CXX_COMPILER_WORKS)
    message(STATUS "WARNING: no working C++ compiler so "
      "setting psttf device to OFF."
      )
    set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
  endif(NOT CMAKE_CXX_COMPILER_WORKS)
endif(PLD_psttf)

# Look for psttf headers and libraries with pkg-config
if(PLD_psttf)
  if(NOT PKG_CONFIG_EXECUTABLE)
    message(STATUS 
    "WARNING: pkg-config not found. Setting PLD_psttf to OFF."
    )
    set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
  endif(NOT PKG_CONFIG_EXECUTABLE)
endif(PLD_psttf)

if(PLD_psttf)
  pkg_check_pkgconfig("lasi;pango;pangoft2" includedir libdir linkflags cflags version _PSTTF)
  if(linkflags)
    #blank-separated required.
    string(REGEX REPLACE ";" " " psttf_COMPILE_FLAGS "${cflags}")
    set(psttf_LINK_FLAGS ${linkflags})
    set(psttf_RPATH ${libdir})
    filter_rpath(psttf_RPATH)
    list(APPEND DRIVERS_LINK_FLAGS ${psttf_LINK_FLAGS})
  else(linkflags)
    message("includedir = ${includedir}")
    message("libdir = ${libdir}")
    message("linkflags = ${linkflags}")
    message("cflags = ${cflags}")
    message(STATUS
       "WARNING: pango, pangoft2, or lasi not found with pkg-config.\n"
    "   Setting PLD_psttf to OFF.  Please install all of these packages\n"
    "   and/or set the environment variable PKG_CONFIG_PATH appropriately."
    )
    set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
  endif(linkflags)
endif(PLD_psttf)
# Test for correct version of liblasi by looking
# for API that was added for 1.0.5 which is required by PLplot.???