schrieb Richard Shaw on 2013-05-07 14:22: > Theoretically, yes. The only problem with testing this right now is if > your build depends on config.h, it may not be able to find it until > fdmdv2_main.h is updated because cmake prefers, and I've enforced > out-of-source builds so my config.h is getting generated in the binary > dir instead of the source dir where fdmdv2_main.h is pointing. > > If you want to test it I would recommend making a copy of the source > manually or with "svn export ...". and manually removing the "../" ah la: > > #include "../config.h" > to > #include "config.h"
Is this the normal process in cmake to define HAVE_CONFIG_H and provide config.h? I though HAVE_CONFIG_H is an autotools thing. But in both cases out of tree building is a fine thing, which leads to the situation that at build time the config.h from the build directory has to be known to the source. Having a path prefix at the include makes that kind of tricky. Except of course the source is copied to the build directory. Besides, I think the check for config.h is a bit flawed anyway. I posted on 2012-12-27 about the proper define for config.h, but this seems got lost somehow. Anyway, here es the explanation and patch again: > schrieb David Rowe on 2012-12-24 07:03: >> (I tried to send this direct to your email address but it bounced) >> >> Hi Patrick, >> >> OK I have applied the first patch and checked in. I made a small change >> to fdmdv_main.h: >> >> #ifndef _NO_AUTOTOOLS_ >> #include "../config.h" >> #endif >> >> So I can still build on Windows and Linux using my makefiles. Dave - >> you will need to add a #define _NO_AUTOTOOLS_ to your IDE build system. > > This is even easier: > Autoconf provides HAVE_CONFIG_H via the DEFS variable in the Makefile, > so you can test for this without need to define anything when you _do > not_ run with autotools/configure: > =================================================================== --- fdmdv2_main.h (Revision 1152) +++ fdmdv2_main.h (Arbeitskopie) @@ -23,7 +23,7 @@ #define __FDMDV2_MAIN__ #include "version.h" -#ifndef _NO_AUTOTOOLS_ +#ifdef HAVE_CONFIG_H #include "../config.h" #endif #include <wx/wx.h> -- Engineers motto: cheap, good, fast: choose any two Patrick Strasser <patrick at wirklich priv at> ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ Freetel-codec2 mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freetel-codec2
