Use proper cmake detection of features.
This attempts to organize all needed items and places appropriate defines in a single location. Redundant comparisons/defines were removed when noticed. A few caveats, however: * This may be better targeted towards the 5_1_0 branch instead of master right now. * Cmake will run a little slower on configuration/generation now. That's due to the sanity checks it runs. * There are some more checks to be added later, but this should be a solid start. Thanks to the [libical](https://github.com/libical/libical) project for inspiration.
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
#include "arch/ArchHooks/ArchHooks.h"
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#include <sys/types.h>
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
RString CrashHandler::GetLogsDirectory()
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
// Replace the main function.
|
||||
extern "C" int sm_main( int argc, char *argv[] );
|
||||
|
||||
#define HAVE_VERSION_INFO
|
||||
#define HAVE_CXA_DEMANGLE
|
||||
#define HAVE_FFMPEG
|
||||
#define HAVE_PTHREAD_COND_TIMEDWAIT
|
||||
@@ -12,11 +11,6 @@ extern "C" int sm_main( int argc, char *argv[] );
|
||||
* this in all cases. If only they could be consistent... */
|
||||
#define HAVE_DECL_SIGUSR1 1
|
||||
|
||||
/* We have <machine/endian.h> which gets pulled in when we use gcc 4.0's <cstdlib>
|
||||
* but no <endian.h>. The definitions of LITTLE_ENDIAN, BIG_ENDIAN and end up conflicting
|
||||
* even though they resolve to the same thing (bug in gcc?). */
|
||||
#define HAVE_MACHINE_ENDIAN_H
|
||||
#define HAVE_INTTYPES_H
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#define CRASH_HANDLER
|
||||
|
||||
@@ -25,7 +19,6 @@ extern "C" int sm_main( int argc, char *argv[] );
|
||||
#define NO_GL_FLUSH
|
||||
|
||||
#define CPU_X86
|
||||
#define ENDIAN_LITTLE
|
||||
#define BACKTRACE_METHOD_X86_DARWIN
|
||||
#define BACKTRACE_LOOKUP_METHOD_DLADDR
|
||||
|
||||
|
||||
Reference in New Issue
Block a user