summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-12-15 14:56:54 +1000
committerTim Mayberry <mojofunk@gmail.com>2016-09-15 21:27:55 +1000
commite297e27b7f41707254f68a9bab8265bd38a9fde8 (patch)
tree4183cdb8c1c332aa08188e8df12ca27f4a3708bd /wscript
parent5643ed4257eb5ddf7a46cb059389516311c22817 (diff)
Add defines necessary for successful gcc/mingw compile with --cxx11 option
_USE_MATH_DEFINES is required for M_PI WIN32 is no longer defined by gcc/mingw with --cxx11 option enabled(of course _WIN32 still is) but as it is used in a liblo header(even though it is probably incorrect to do so) define it.
Diffstat (limited to 'wscript')
-rw-r--r--wscript5
1 files changed, 5 insertions, 0 deletions
diff --git a/wscript b/wscript
index c76e3b6ccc..82505dc74d 100644
--- a/wscript
+++ b/wscript
@@ -999,6 +999,11 @@ int main () { int x = SFC_RF64_AUTO_DOWNGRADE; return 0; }
conf.env.append_value('CFLAGS', '-DCOMPILER_MINGW')
conf.env.append_value('CXXFLAGS', '-DPLATFORM_WINDOWS')
conf.env.append_value('CXXFLAGS', '-DCOMPILER_MINGW')
+ if conf.options.cxx11:
+ conf.env.append_value('CFLAGS', '-D_USE_MATH_DEFINES')
+ conf.env.append_value('CXXFLAGS', '-D_USE_MATH_DEFINES')
+ conf.env.append_value('CFLAGS', '-DWIN32')
+ conf.env.append_value('CXXFLAGS', '-DWIN32')
conf.env.append_value('LIB', 'pthread')
# needed for at least libsmf
conf.check_cc(function_name='htonl', header_name='winsock2.h', lib='ws2_32')