scripts/cmake/gensrc.cmake.in

Branch


Log

Author Commit Date CI Message
Cosmin Truta 0cc6436e 2025-05-29T22:55:00 build: Repair and reduce the CMake build dependency graph A funny thing happened while refactoring the function argument parsing in the `PNGGenConfig` module: the processing of dependencies inside the CMake function `generate_copy` got fixed, thanks to an inadvertent typo correction! Going down the rabbit hole, we uncovered two issues: 1. A typo in `scripts/cmake/PNGGenConfig.cmake` caused a dependency declaration to disappear, disrupting the graph. Fortunately, this disruption was being mitigated by an additional set of (redundant) symbolic target declarations that kept the CMake build going. 2. The exact string matching inside `scripts/cmake/gensrc.cmake.in` imposed an artificial limitation, disallowing the use of absolute file paths. The typo correction in (1), and the use of regex matching instead of exact string matching in (2), allowed us to use absolute file paths in the main CMake file, consistently, thus allowing CMake to recognize them as uniquely-identifiable nodes in the dependency graph. There should be no further need to have extra symbolic targets for proper node identification. In the end, we shaved off the redundant symbolic target declarations, retaining only `png_genfiles` and `png_genprebuilt`.
Cosmin Truta 4edbb4da 2024-01-22T17:24:59 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.