/usr/share/doc/libplplot12/examples/lua/CMakeLists.txt is in libplplot-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 | # examples/lua/CMakeLists.txt
### Process this file with cmake to produce Makefile
###
# Copyright (C) 2009 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(lua_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(lua_SCRIPTS)
foreach(STRING_INDEX ${lua_STRING_INDICES})
set(lua_SCRIPTS ${lua_SCRIPTS} x${STRING_INDEX}.lua)
endforeach(STRING_INDEX ${lua_STRING_INDICES})
if(CORE_BUILD)
# These permissions because lua scripts are not standalone.
set(PERM_DATA
OWNER_READ
OWNER_WRITE
GROUP_READ
WORLD_READ
)
install(FILES ${lua_SCRIPTS}
DESTINATION ${DATA_DIR}/examples/lua
PERMISSIONS ${PERM_DATA}
)
if(BUILD_TEST)
# equivalent to install commands but at "make" time rather than
# "make install" time, to the build tree if different than the source
# tree.
set(command_depends)
foreach(file ${lua_SCRIPTS})
set(
command_DEPENDS
${command_DEPENDS}
${CMAKE_CURRENT_BINARY_DIR}/${file}
)
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}
)
endforeach(file ${lua_SCRIPTS} ${lua_DATA})
add_custom_target(lua_examples ALL DEPENDS ${command_DEPENDS})
set_property(GLOBAL PROPERTY TARGETS_examples_lua lua_examples plplotluac)
set_property(GLOBAL PROPERTY FILES_examples_lua ${command_DEPENDS})
endif(BUILD_TEST)
if(USE_DLL_SUBDIRECTORY)
set(lua_lib_location ${CMAKE_BINARY_DIR}/dll)
else(USE_DLL_SUBDIRECTORY)
set(lua_lib_location ${CMAKE_BINARY_DIR}/bindings/lua)
endif(USE_DLL_SUBDIRECTORY)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/plplot_examples.lua.in
${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua
@ONLY
)
set(lua_lib_location ${LUA_DIR})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/plplot_examples.lua.in
${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua_install
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plplot_examples.lua_install
DESTINATION ${DATA_DIR}/examples/lua
PERMISSIONS ${PERM_DATA}
RENAME plplot_examples.lua
)
install(FILES CMakeLists.txt
DESTINATION ${DATA_DIR}/examples/lua
)
else(CORE_BUILD)
set_property(GLOBAL PROPERTY TARGETS_examples_lua plplotluac)
set_property(GLOBAL PROPERTY FILES_examples_lua)
foreach(file ${lua_SCRIPTS})
set_property(GLOBAL APPEND PROPERTY
FILES_examples_lua ${CMAKE_CURRENT_SOURCE_DIR}/${file}
)
endforeach(file ${lua_SCRIPTS} ${lua_DATA})
endif(CORE_BUILD)
|