how to do AH_VERBATIM equivalent in cmake?
Benjamin Reed
rangerrick at gmail.com
Sat Jan 28 23:23:28 CET 2006
I've gotten to kio on Mac OS X now, but have run into a build issue
linking. _environ is provided by a call to _NSGetEnviron, and needs a
little bit of code to do it automatically. This used to go in
config.h with the autotools build, like this:
--(snip!)--
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define
if your system needs _NSGetEnviron to set up the environment])])
AH_VERBATIM(_DARWIN_ENVIRON,
[
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
# include <sys/time.h>
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#endif
])
--(snip!)--
Is there an equivalent in cmake? Or should I be doing the check and
then putting it in some header that gets included wherever I run into
the issue?
More information about the Kde-buildsystem
mailing list