From 9ba11949ca58537c1f511e0919243ede7b86507d Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 5 May 2025 14:52:02 +0200 Subject: [PATCH] Rename config header input files to better names Up to FLTK 1.4 we had two distinct input files for each header file: one for configure and one for CMake. Since 1.5 we have only one input file for each header which can now have a more appropriate name. 1) configh.cmake.in -> config.h.in 2) fl_config.cmake.in -> fl_config.h.in --- CMake/export.cmake | 2 +- CMakeLists.txt | 2 +- configh.cmake.in => config.h.in | 21 ++++++++++++--------- fl_config.cmake.in => fl_config.h.in | 7 ++++--- 4 files changed, 18 insertions(+), 14 deletions(-) rename configh.cmake.in => config.h.in (89%) rename fl_config.cmake.in => fl_config.h.in (85%) diff --git a/CMake/export.cmake b/CMake/export.cmake index 5ae2b84da..642be6762 100644 --- a/CMake/export.cmake +++ b/CMake/export.cmake @@ -150,7 +150,7 @@ else(IS_ABSOLUTE "${FLTK_DOCDIR}") set(PREFIX_DOC "${CMAKE_INSTALL_PREFIX}/${FLTK_DOCDIR}/fltk") endif(IS_ABSOLUTE "${FLTK_DOCDIR}") -set(CONFIG_H_IN configh.cmake.in) +set(CONFIG_H_IN config.h.in) set(CONFIG_H config.h) # generate config.h diff --git a/CMakeLists.txt b/CMakeLists.txt index d1496fc16..db6e0bb8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,7 +267,7 @@ include(CMake/variables.cmake) include(CMake/export.cmake) configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/fl_config.cmake.in + ${CMAKE_CURRENT_SOURCE_DIR}/fl_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/FL/fl_config.h @ONLY ) diff --git a/configh.cmake.in b/config.h.in similarity index 89% rename from configh.cmake.in rename to config.h.in index b01d4fba6..b74a7a1ac 100644 --- a/configh.cmake.in +++ b/config.h.in @@ -1,8 +1,9 @@ /* @CONFIG_H@. Generated from @CONFIG_H_IN@ by CMake. */ /* - * Configuration file for the Fast Light Tool Kit (FLTK). + * Configuration file for the Fast Light Tool Kit (FLTK). This file is used + * internally in the FLTK library and is not publicly available (not installed). * - * Copyright 1998-2024 by Bill Spitzak and others. + * Copyright 1998-2025 by Bill Spitzak and others. * * This library is free software. Distribution and use rights are outlined in * the file "COPYING" which should have been included with this file. If this @@ -16,15 +17,17 @@ */ /* - * Note: configure syntax vs. CMake syntax in source files (examples): + * Note: CMake syntax in input file (examples): * - * configh.in configh.cmake.in - * --------------------- ---------------------------- - * [#]define HAVE_GL 0 [#]cmakedefine01 HAVE_GL - * [#]undef HAVE_SNPRINTF [#]cmakedefine HAVE_SNPRINTF 1 + * For instance in @CONFIG_H_IN@ (remove brackets for real syntax): + * ---------------------------------------------------------------- + * [#]cmakedefine01 HAVE_GL + * [#]cmakedefine HAVE_SNPRINTF 1 * - * The former defines the given macro either as 0 or 1, - * the latter either does not define the macro or defines it as 1. + * The former defines HAVE_GL either as 0 or 1. + * + * The latter either doesn't define HAVE_SNPRINTF or defines it as 1. + * The value (1 in the example) can be an arbitrary number or string. */ /* diff --git a/fl_config.cmake.in b/fl_config.h.in similarity index 85% rename from fl_config.cmake.in rename to fl_config.h.in index 1610534fb..6f46cf65f 100644 --- a/fl_config.cmake.in +++ b/fl_config.h.in @@ -1,8 +1,9 @@ -/* FL/fl_config.h. Generated from fl_config.cmake.in by CMake. */ +/* FL/fl_config.h. Generated from fl_config.h.in by CMake. */ /* - * Build configuration file for the Fast Light Tool Kit (FLTK). + * Build configuration file for the Fast Light Tool Kit (FLTK). This + * configuration file is publicly accessible by user programs (installed). * - * Copyright 1998-2024 by Bill Spitzak and others. + * Copyright 1998-2025 by Bill Spitzak and others. * * This library is free software. Distribution and use rights are outlined in * the file "COPYING" which should have been included with this file. If this