File: CMakeLists.txt

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 (149 lines) | stat: -rw-r--r-- 4,582 bytes parent folder | download | duplicates (2)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# include/CMakeLists.txt for PLplot
###
### Process this file with cmake to produce Makefile
###
# 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 PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/plConfig.h.in
  ${CMAKE_CURRENT_BINARY_DIR}/plConfig.h
  )

configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/plDevs.h.in
  ${CMAKE_CURRENT_BINARY_DIR}/plDevs.h
  )

configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/pldll.h.in
  ${CMAKE_CURRENT_BINARY_DIR}/pldll.h
  )

set(plhershey-unicode-gen_SRCS
  ${CMAKE_SOURCE_DIR}/fonts/plhershey-unicode-gen.c
  )

if(NOT CMAKE_CROSSCOMPILING)
  add_executable(plhershey-unicode-gen ${plhershey-unicode-gen_SRCS})
else(NOT CMAKE_CROSSCOMPILING)
  SET(IMPORT_EXECUTABLES ${CMAKE_NATIVE_BINARY_DIR}/include/ImportExecutables.cmake)
  INCLUDE(${IMPORT_EXECUTABLES})
endif(NOT CMAKE_CROSSCOMPILING)

add_custom_command(
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plhershey-unicode.h
  COMMAND plhershey-unicode-gen
  ${CMAKE_SOURCE_DIR}/fonts/plhershey-unicode.csv
  ${CMAKE_CURRENT_BINARY_DIR}/plhershey-unicode.h
  DEPENDS
  plhershey-unicode-gen
  ${CMAKE_SOURCE_DIR}/fonts/plhershey-unicode.csv
  )

if(NOT CMAKE_CROSSCOMPILING) 
  export(TARGETS plhershey-unicode-gen FILE ${CMAKE_CURRENT_BINARY_DIR}/ImportExecutables.cmake )
endif(NOT CMAKE_CROSSCOMPILING) 

# For cross-directory dependencies....
add_custom_target(
  plhershey-unicode.h_built
  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plhershey-unicode.h
  )

set(include_INSTALLED_HEADERS
  disptab.h
  drivers.h
  pdf.h
  pldebug.h
  ${CMAKE_CURRENT_BINARY_DIR}/pldll.h
  plevent.h
  plplot.h
  plplotP.h
  plstrm.h
  plxwd.h
  gcw.h
  plplotcanvas.h
  ${CMAKE_CURRENT_BINARY_DIR}/plConfig.h
  ${CMAKE_CURRENT_BINARY_DIR}/plDevs.h
  )

#qt.h only useful if anyone wants to build a Qt application with the Qt widget driver
if(PLD_qtwidget OR PLD_extqt)
  list(APPEND include_INSTALLED_HEADERS qt.h)
endif(PLD_qtwidget OR PLD_extqt)

if(ANY_QT_DEVICE)
  set(MOC_OPTIONS)
  if(PLD_bmpqt)
    list(APPEND MOC_OPTIONS -DPLD_bmpqt)
  endif(PLD_bmpqt)
  if(PLD_jpgqt)
    list(APPEND MOC_OPTIONS -DPLD_jpgqt)
  endif(PLD_jpgqt)
  if(PLD_pngqt)
    list(APPEND MOC_OPTIONS -DPLD_pngqt)
  endif(PLD_pngqt)
  if(PLD_ppmqt)
    list(APPEND MOC_OPTIONS -DPLD_ppmqt)
  endif(PLD_ppmqt)
  if(PLD_tiffqt)
    list(APPEND MOC_OPTIONS -DPLD_tiffqt)
  endif(PLD_tiffqt)
  if(PLD_svgqt)
    list(APPEND MOC_OPTIONS -DPLD_svgqt)
  endif(PLD_svgqt)
  if(PLD_epsqt)
    list(APPEND MOC_OPTIONS -DPLD_epsqt)
  endif(PLD_epsqt)
  if(PLD_pdfqt)
    list(APPEND MOC_OPTIONS -DPLD_pdfqt)
  endif(PLD_pdfqt)
  if(PLD_qtwidget)
    list(APPEND MOC_OPTIONS -DPLD_qtwidget)
  endif(PLD_qtwidget)
  if(PLD_extqt)
    list(APPEND MOC_OPTIONS -DPLD_extqt)
  endif(PLD_extqt)
  if(MOC_OPTIONS)
    # This creates a custom command with OUTPUT ${QT_MOC_OUTFILES}.
    qt4_wrap_cpp(
      QT_MOC_OUTFILES
      ${CMAKE_SOURCE_DIR}/include/qt.h
      OPTIONS ${MOC_OPTIONS}
      )
    # Use custom target to force correct target dependencies in
    # various directories.  This target is used in three possible
    # places (qt_gui, drivers, or src) depending on build options.
    # The CMake dependency parser creates the necessary file
    # dependency on qt.h for all qt-related source code so there is no
    # need to add the ${QT_MOC_OUTFILES} file dependencies for any
    # target dependency on moc_outfiles_generated.
    add_custom_target(moc_outfile_generated DEPENDS ${QT_MOC_OUTFILES})

    # #include ${QT_MOC_OUTFILES}) indirectly via the configured moc_files.h
    # header.
    configure_file(
      ${CMAKE_CURRENT_SOURCE_DIR}/moc_files.h.in
      ${CMAKE_CURRENT_BINARY_DIR}/moc_files.h
      )
  else(MOC_OPTIONS)
    message(FATAL_ERROR "Internal build system inconsistency between ANY_QT_DEVICE true and MOC_OPTIONS false.")
  endif(MOC_OPTIONS)
endif(ANY_QT_DEVICE)

install(FILES ${include_INSTALLED_HEADERS} DESTINATION ${INCLUDE_DIR})