From 30d00ceb075adaa945a5176a3272982a856f0a9b Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 14 Apr 2010 20:17:44 +0000 Subject: Fludi IDE: now supporting header files for OS X. If those are included for a library, the resulting framework will receive a copy of the headers, allowing Xcode to simply include the file into any new project. frameworks must be installed in /Library?Frameworks to be found automatically. A little more fixing is required. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7504 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/dirent.h | 1 + FL/filename.H | 8 ++++++++ FL/math.h | 13 ++++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'FL') diff --git a/FL/dirent.h b/FL/dirent.h index 6eda14751..fbc54a628 100644 --- a/FL/dirent.h +++ b/FL/dirent.h @@ -25,6 +25,7 @@ // http://www.fltk.org/str.php // + // this file is for back-compatability only #include "filename.H" diff --git a/FL/filename.H b/FL/filename.H index 06041155a..29d0bcf91 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -25,6 +25,12 @@ * http://www.fltk.org/str.php */ +// Xcode on OS X includes files by recursing down into directories. +// This code catches the cycle and directly includes the required file. +#ifdef fl_dirent_h_cyclic_include +# include "/usr/include/dirent.h" +#endif + #ifndef FL_FILENAME_H # define FL_FILENAME_H @@ -94,7 +100,9 @@ struct dirent {char d_name[1];}; * It would be best to create a file that does this... */ # include +# define fl_dirent_h_cyclic_include # include +# undef fl_dirent_h_cyclic_include # endif # if defined (__cplusplus) diff --git a/FL/math.h b/FL/math.h index f453c0a56..b3b4c7cac 100644 --- a/FL/math.h +++ b/FL/math.h @@ -25,15 +25,18 @@ // http://www.fltk.org/str.php // +// Xcode on OS X includes files by recursing down into directories. +// This code catches the cycle and directly includes the required file. +#ifdef fl_math_h_cyclic_include +# include "/usr/include/math.h" +#endif + #ifndef fl_math_h # define fl_math_h -// Apple's ProjectBuilder has the nasty habit of including recursively -// down the file tree. To avoid re-including we must -// directly include the systems math file. (Plus, I could not find a -// predefined macro for ProjectBuilder builds, so we have to define it -// in the project) +# define fl_math_h_cyclic_include # include +# undef fl_math_h_cyclic_include # ifdef __EMX__ # include -- cgit v1.2.3