/usr/share/doc/libplplot12/examples/tcl/CMakeLists.txt is in plplot-tcl-dev 5.10.0+dfsg2-0.1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | # examples/tcl/CMakeLists.txt
### Process this file with cmake to produce Makefile
###
# Copyright (C) 2006-2012 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
# N.B. This file is used for both the core build (which installs the examples
# and optionally [depending on BUILD_TEST} builds them) and the installed
# examples build. The core build has BUILD_TEST OFF or ON at user option
# and CORE_BUILD always ON. The installed examples build always has
# BUILD_TEST ON and CORE_BUILD OFF.
set(tcl_FILES
README.tcldemos
plgrid.tcl
plot.dat
plot.tcl
r.dat
stats.log
tcldemos.tcl
)
set(tcl_STRING_INDICES
"00"
"01"
"02"
"03"
"04"
"05"
"06"
"07"
"08"
"09"
"10"
"11"
"12"
"13"
"14"
"15"
"16"
"17"
"18"
"19"
"20"
"21"
"22"
"23"
"24"
"25"
"26"
"27"
"28"
"29"
"30"
"31"
"33"
)
set(tcl_SCRIPTS)
foreach(STRING_INDEX ${tcl_STRING_INDICES})
set(tcl_FILES ${tcl_FILES} x${STRING_INDEX}.tcl)
set(tcl_SCRIPTS ${tcl_SCRIPTS} x${STRING_INDEX})
endforeach(STRING_INDEX ${tcl_STRING_INDICES})
# pltcl_standard_examples is a configured shell script that runs all
# the standard examples under pltcl.
get_target_property(pltcl_LOCATION pltcl LOCATION)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/pltcl_standard_examples.in
${CMAKE_CURRENT_BINARY_DIR}/pltcl_standard_examples
@ONLY
)
# tclsh_standard_examples is a configured shell script that runs all
# the standard examples under tclsh use a TEA-based approach.
# pkgIndex_LOCATION is the directory where the relevant pkgIndex.tcl
# file is located.
if(CORE_BUILD)
set(pkgIndex_LOCATION ${CMAKE_BINARY_DIR}/bindings/tcl)
else(CORE_BUILD)
set(pkgIndex_LOCATION ${DATA_DIR})
endif(CORE_BUILD)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/tclsh_standard_examples.in
${CMAKE_CURRENT_BINARY_DIR}/tclsh_standard_examples
@ONLY
)
# Copy file and scripts to the binary directory if different to the
# source directory. Needed for ctest, but also so the tclIndex file
# is generated in the binary tree not the source tree.
set(tclIndex_DEPENDS)
foreach(file ${tcl_SCRIPTS} ${tcl_FILES})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
)
list(APPEND tclIndex_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${file})
endforeach(file ${tcl_SCRIPTS} ${tcl_FILES})
add_custom_target(tcl_examples ALL DEPENDS ${tclIndex_DEPENDS})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tclIndex
COMMAND ${TCL_TCLSH} ${MKTCLINDEX} ${MKTCLINDEX_ARGS}
DEPENDS ${tclIndex_DEPENDS}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_target(tclIndex_examples_tcl ALL
DEPENDS ${tclIndex_DEPENDS} ${CMAKE_CURRENT_BINARY_DIR}/tclIndex
)
# These two custom targets file-depend on common files so must serialize.
add_dependencies(tclIndex_examples_tcl tcl_examples)
if(CORE_BUILD)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/tclIndex
DESTINATION ${DATA_DIR}/examples/tcl
)
install(FILES ${tcl_FILES} DESTINATION ${DATA_DIR}/examples/tcl)
install(PROGRAMS ${tcl_SCRIPTS} pltcl_standard_examples.in tclsh_standard_examples.in
DESTINATION ${DATA_DIR}/examples/tcl
)
install(FILES CMakeLists.txt
DESTINATION ${DATA_DIR}/examples/tcl
)
endif(CORE_BUILD)
if(BUILD_TEST)
if(CORE_BUILD)
set_property(GLOBAL PROPERTY TARGETS_examples_tcl
tcl_examples
tclIndex_examples_tcl
plplottcltk${LIB_TAG}
pltcl
plplot.tcl_target
tclIndex_tcl
)
get_property(files_plplot.tcl_target GLOBAL PROPERTY FILES_plplot.tcl_target)
get_property(files_tclIndex_tcl GLOBAL PROPERTY FILES_tclIndex_tcl)
set_property(GLOBAL PROPERTY FILES_examples_tcl
${tclIndex_DEPENDS}
${CMAKE_CURRENT_BINARY_DIR}/tclIndex
plplottcltk${LIB_TAG}
pltcl
${files_plplot.tcl_target}
${files_tclIndex_tcl}
)
else(CORE_BUILD)
set_property(GLOBAL PROPERTY TARGETS_examples_tcl
tcl_examples
plplottcltk${LIB_TAG}
)
set_property(GLOBAL PROPERTY FILES_examples_tcl
${tclIndex_DEPENDS}
plplottcltk${LIB_TAG}
)
endif(CORE_BUILD)
endif(BUILD_TEST)
|