From 9adb18115634bf35868de920a0d0be2009beb86a Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 12 Jul 2015 19:23:55 +0000 Subject: Make FL_ABI_VERSION configurable (STR #3161). This commit adds the configure option --with-abiversion and the CMake option OPTION_ABI_VERSION. Both options can be set e.g. to 10304 to build with FL_ABI_VERSION = 10304 (FLTK 1.3.4). For IDE builds there are new files ide//FL/abi-version.h that can be edited to change the ABI version before the FLTK lib is built. Note that this file MUST be copied to the include/FL directory if the IDE-built library is to be installed. The default is FL_ABI_VERSION = FL_MAJOR*10000 + FL_MINOR*100 + 0, i.e. 10300 for all FLTK 1.3.x versions to keep binary compatibility (ABI). Todo: more tests and more documentation. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Enumerations.H | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'FL') diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 5746391eb..675c8c562 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -23,23 +23,28 @@ #ifndef Fl_Enumerations_H #define Fl_Enumerations_H -/* Uncomment the following FL_ABI_VERSION line to enable ABI breaking fixes - * in the current patch release of FLTK. ** Use for static builds only! ** - * For more info on this macro, see: http://fltk.org/cmp.php#FLTK_ABI_VERSION - ****************************************************************************** - * Note: the link above is outdated. - * FIXME: Update docs ... +/* ****************************************************************************** - * This is work in progress! + * Notes on FL_ABI_VERSION and deprecated (obsolete) FLTK_ABI_VERSION: + * + * (1) FLTK_ABI_VERSION is deprecated, but still defined below. + * Do NOT define FLTK_ABI_VERSION here - it would be overwritten later. * - * OLD: FLTK_ABI_VERSION deprecated, but defined later (see below) - * NEW: FL_ABI_VERSION FIXME: to be defined by configure ! + * (2) FL_ABI_VERSION is now (as of FLTK 1.3.4) defined by configure + * or CMake. Do NOT define it here. Its definition will be included + * below by "#include ". * - * The intent is to define FL_ABI_VERSION by configure and CMake. - * When this is done, the definition will be #include'd here ! + * (3) If you use the provided IDE files (Windows VC++ or Xcode) you should + * edit the definition in the provided IDE subdirectory. The correct + * file is `/path/to/fltk/ide//FL/abi-version.h' . + * + ****************************************************************************** + * For more info on FL_ABI_VERSION, see: http://fltk.org/cmp.php#FL_ABI_VERSION + * FIXME: Update docs ... ****************************************************************************** */ -//#define FL_ABI_VERSION 10304 + +#include # include "Fl_Export.H" # include "fl_types.h" @@ -166,7 +171,8 @@ 10300 <= FL_ABI_VERSION <= 10304 - Note: configure + CMake not yet implemented, see also STR #3161. + Note: configure + CMake can be used to define FL_ABI_VERSION, but they + do not check validity. This is done here. */ #if FL_ABI_VERSION < FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100 @@ -184,8 +190,8 @@ /* FLTK_ABI_VERSION is deprecated (replaced by FL_ABI_VERSION). - This deprecated constant should be removed in FLTK 1.4.0 and later. - Please use FL_ABI_VERSION instead. + This deprecated constant will be removed in FLTK 1.4.0 and later. + Please use FL_ABI_VERSION when FLTK 1.4.0 has been released. */ #ifdef FLTK_ABI_VERSION -- cgit v1.2.3