Check for MinGW in CMakeLists.txt instead of config.h

This commit is contained in:
Chris Robinson
2013-06-20 17:17:17 -07:00
parent ed0568bb24
commit 4017e4a96a
2 changed files with 5 additions and 4 deletions
+5 -1
View File
@@ -206,7 +206,11 @@ ENDIF()
# Set visibility/export options if available
IF(WIN32)
SET(EXPORT_DECL "__declspec(dllexport)")
SET(ALIGN_DECL "__declspec(align(x))")
IF(NOT MINGW)
SET(ALIGN_DECL "__declspec(align(x))")
ELSE()
SET(ALIGN_DECL "__declspec(aligned(x))")
ENDIF()
OPTION(WINE "Enable use of Wine headers when compiling" OFF)
IF(WINE)
-3
View File
@@ -13,9 +13,6 @@
/* Define any available alignment declaration */
#define ALIGN(x) ${ALIGN_DECL}
#ifdef __MINGW32__
#define align(x) aligned(x)
#endif
/* Define if we have the C11 aligned_alloc function */
#cmakedefine HAVE_ALIGNED_ALLOC