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:
@@ -6,14 +6,19 @@
|
||||
#include "RageUtil_FileDB.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
#if defined(HAVE_FCNTL_H)
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#include <cerrno>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if !defined(WIN32)
|
||||
|
||||
#if defined(HAVE_DIRENT_H)
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include "archutils/Win32/ErrorStrings.h"
|
||||
#include <windows.h>
|
||||
|
||||
Reference in New Issue
Block a user