build: Move scripts/*.cmake.in to scripts/cmake/; add cmake/AUTHORS.md

From the libpng licensing point of view, the build projects, the build
scripts, the test scripts, the CI verification scripts, et cetera, have
not traditionally been part of libpng proper, although some of these,
including the CMake-based build, have been released under the libpng
license.

Considering how the CMake build grew as a result of many contributions
from many contributing authors over a long time, one may argue that it
almost became an individual piece of software in its own right.

Moving on, everything CMake-related shall be placed in the subdirectory
scripts/cmake/ (except, of course, the main CMakeLists.txt). Moreover,
contributing authors shall be acknowledged in scripts/cmake/AUTHORS.md.

Please see scripts/cmake/README.md for more information.
This commit is contained in:
Cosmin Truta
2024-01-22 17:24:59 +02:00
parent 9a774b9156
commit 4edbb4da81
7 changed files with 132 additions and 66 deletions

35
scripts/cmake/AUTHORS.md Normal file
View File

@@ -0,0 +1,35 @@
CMake Files, Lists and Scripts for the PNG Reference Library
============================================================
Author List
-----------
* Alex Gaynor
* Andreas Franek
* B. Scott Michel
* Cameron Cawley
* Christian Ehrlicher
* Christopher Sean Morrison
* Claudio Bley
* Clifford Yapp
* Clinton Ingram
* Cosmin Truta
* David Callu
* Gleb Mazovetskiy
* Glenn Randers-Pehrson
* Gunther Nikl
* Jeremy Maitin-Shepard
* John Bowler
* Jon Creighton
* Kyle Bentley
* Martin Storsjö
* Owen Rudge
* Roger Leigh
* Roger Lowman
* Sam Serrels
* Simon Hausmann
* Steve Robinson
* Timothy Lyanguzov
* Tyler Kropp
* Vadim Barkov
* Vicky Pfau

35
scripts/cmake/README.md Normal file
View File

@@ -0,0 +1,35 @@
CMake Files, Lists and Scripts for the PNG Reference Library
============================================================
Copyright Notice
----------------
* Copyright (c) 2018-2024 Cosmin Truta.
* Copyright (c) 2007-2018 Glenn Randers-Pehrson.
* Originally written by Christian Ehrlicher, 2007.
Use, modification and distribution of the CMake
files in the libpng distribution are subject to
the same licensing terms and conditions as libpng.
Please see the copyright notice in `png.h` or visit
http://libpng.org/pub/png/src/libpng-LICENSE.txt
File List
---------
CMakeLists.txt ==> The main CMake lists file
scripts/cmake/AUTHORS.md ==> The Authors file
scripts/cmake/README.md ==> This file
scripts/cmake/genchk.cmake.in ==> Template for genchk.cmake
scripts/cmake/genout.cmake.in ==> Template for genout.cmake
scripts/cmake/gensrc.cmake.in ==> Template for gensrc.cmake
scripts/cmake/test.cmake.in ==> Template for test.cmake
Acknowledgements
----------------
See the accompanying file `scripts/cmake/AUTHORS.md`
for the list of Contributing Authors.
If you are a Contributing Author, please make sure
that you are being acknowledged.

View File

@@ -1,13 +1,16 @@
# genchk.cmake.in
# Generate .chk from .out with awk (generic), based upon the automake logic.
# Copyright (c) 2022-2023 Cosmin Truta
# Copyright (c) 2022-2024 Cosmin Truta
# Copyright (c) 2016 Glenn Randers-Pehrson
# Written by Roger Leigh, 2016
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
#
# Use, modification and distribution are subject to
# the same licensing terms and conditions as libpng.
# Please see the copyright notice in png.h or visit
# http://libpng.org/pub/png/src/libpng-LICENSE.txt
#
# SPDX-License-Identifier: libpng-2.0
# Variables substituted from CMakeLists.txt
set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")

View File

@@ -1,13 +1,16 @@
# genout.cmake.in
# Generate .out from .c with awk (generic), based upon the automake logic.
# Copyright (c) 2022-2023 Cosmin Truta
# Copyright (c) 2022-2024 Cosmin Truta
# Copyright (c) 2016 Glenn Randers-Pehrson
# Written by Roger Leigh, 2016
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
#
# Use, modification and distribution are subject to
# the same licensing terms and conditions as libpng.
# Please see the copyright notice in png.h or visit
# http://libpng.org/pub/png/src/libpng-LICENSE.txt
#
# SPDX-License-Identifier: libpng-2.0
# Variables substituted from CMakeLists.txt
set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")

View File

@@ -1,13 +1,16 @@
# gensrc.cmake.in
# Generate source files with awk, based upon the automake logic.
# Copyright (c) 2022-2023 Cosmin Truta
# Copyright (c) 2022-2024 Cosmin Truta
# Copyright (c) 2016 Glenn Randers-Pehrson
# Written by Roger Leigh, 2016
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
#
# Use, modification and distribution are subject to
# the same licensing terms and conditions as libpng.
# Please see the copyright notice in png.h or visit
# http://libpng.org/pub/png/src/libpng-LICENSE.txt
#
# SPDX-License-Identifier: libpng-2.0
# Variables substituted from CMakeLists.txt
set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")
@@ -135,5 +138,7 @@ elseif(OUTPUT STREQUAL "scripts/pnglibconf.h.prebuilt")
message(FATAL_ERROR "Stopping build")
else()
message(FATAL_ERROR "Unsupported output: ${OUTPUT}")
endif()

View File

@@ -1,11 +1,15 @@
# test.cmake.in
# Copyright (C) 2016 Glenn Randers-Pehrson
# Copyright (c) 2024 Cosmin Truta
# Copyright (c) 2016 Glenn Randers-Pehrson
# Written by Roger Leigh, 2016
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
#
# Use, modification and distribution are subject to
# the same licensing terms and conditions as libpng.
# Please see the copyright notice in png.h or visit
# http://libpng.org/pub/png/src/libpng-LICENSE.txt
#
# SPDX-License-Identifier: libpng-2.0
set(TEST_OPTIONS "@TEST_OPTIONS@")
set(TEST_FILES "@TEST_FILES@")
@@ -22,8 +26,7 @@ if(WIN32)
set(ENV{PATH} "${LIBPNG_DIR};$ENV{PATH}")
endif()
execute_process(COMMAND "${CMAKE_COMMAND}" -E echo "Running ${TEST_COMMAND}" ${TEST_OPTIONS} ${NATIVE_TEST_FILES})
message("Running ${TEST_COMMAND}" ${TEST_OPTIONS} ${NATIVE_TEST_FILES})
execute_process(COMMAND "${TEST_COMMAND}" ${TEST_OPTIONS} ${NATIVE_TEST_FILES}
RESULT_VARIABLE TEST_STATUS)
if(TEST_STATUS)