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 82 83 84 85
|
# cmake/modules/psttf.cmake
#
# Copyright (C) 2006-2018 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 device is enabled.
# PLD_psttfc - ON means the psttfc device is 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 OR PLD_psttfc)
if(NOT CMAKE_CXX_COMPILER_WORKS)
message(STATUS "WARNING: no working C++ compiler so "
"setting PLD_psttf and PLD_psttfc to OFF."
)
set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
set(PLD_psttfc OFF CACHE BOOL "Enable psttfc device" FORCE)
endif(NOT CMAKE_CXX_COMPILER_WORKS)
endif(PLD_psttf OR PLD_psttfc)
# Look for psttf headers and libraries with pkg-config
if(PLD_psttf OR PLD_psttfc)
if(NOT PKG_CONFIG_EXECUTABLE)
message(STATUS
"WARNING: pkg-config not found so setting PLD_psttf and PLD_psttfc to OFF."
)
set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
set(PLD_psttfc OFF CACHE BOOL "Enable psttfc device" FORCE)
endif(NOT PKG_CONFIG_EXECUTABLE)
endif(PLD_psttf OR PLD_psttfc)
if(PLD_psttf OR PLD_psttfc)
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 and PLD_psttfc 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)
set(PLD_psttfc OFF CACHE BOOL "Enable psttfc device" FORCE)
endif(linkflags)
endif(PLD_psttf OR PLD_psttfc)
# Test for correct version of liblasi by looking
# for API that was added for 1.0.5 which is required by PLplot.???
|