freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: Best way to make & maintain custom module list?


From: David Turner
Subject: Re: Q: Best way to make & maintain custom module list?
Date: Fri, 28 Jul 2000 11:32:23 +0200

Hi Enrik,

> 
> Right now the definitions for what modules to include in the compiled
> FreeType library are contained in ftmodule.h. If you for example want to
> compile multiple versions of the library with different modules in them
> (say, copyright-safe vs. full vs. small versions) this file needs to be
> replaced for each version, or at least edited with a rather complex set of
> flags that turn modules on/off.
> 
> It seems a little bit awkward to have to do this to a file so deep in the
> source tree, so I wonder if there's a better way to do this? Otherwise I'd
> suggest some kind of compile time-definable constant to control where to get
> the module inclusion list, or something similar, for example:
> 
> #ifdef MODULES_CONFIG_FILE
>     #include MODULES_CONFIG_FILE
> #else
>     <<list of all modules>>
> #endif
> 
> inside ftmodule.h.
> 
> (I wouldn't mind a nicer name for the constant. )
> 
> In this way you wouldn't need to touch the source tree to compile a
> different set of modules.
> 

Actually, you don't need to  change the source tree, here's the setup
that I use for project-specific builds:

  - I create a directory named "project"
  - I add the following files to the project:

         project/freetype/config/ftmodule.h
         project/freetype/config/ftoption.h
         project/ftsystem.c

  - I add "project" as to the compilation include
    path, in front of "freetype2/include"

  - I export the variable FTSYS_SRC as the path to "project/ftsystem.c"
    (because I'm using the FT2 build system)

This way, my own versions of "ftoption.h" and "ftmodule.h"
are chosen instead of the standard ones..

The only inconvenience is that you need to add two
sub-directories to "project".. but it avoids a lot
of pre-processor tricks..

Regards,

- David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]