fix compilation / ensure this check only runs when compiling on windows

This commit is contained in:
jacob1
2017-10-13 00:03:35 -04:00
parent 536b20b164
commit 3c2de70564
2 changed files with 6 additions and 3 deletions

View File

@@ -473,7 +473,10 @@ elif GetOption('release'):
if GetOption('static'): if GetOption('static'):
if platform == "Windows": if platform == "Windows":
if compilePlatform == "Windows":
env.Append(CPPDEFINES=['_PTW32_STATIC_LIB']) env.Append(CPPDEFINES=['_PTW32_STATIC_LIB'])
else:
env.Append(CPPDEFINES=['PTW32_STATIC_LIB'])
if msvc: if msvc:
env.Append(CPPDEFINES=['ZLIB_WINAPI']) env.Append(CPPDEFINES=['ZLIB_WINAPI'])
else: else:

View File

@@ -17,8 +17,8 @@
#undef GetUserName #undef GetUserName
// Fix deprecation warnings with recent pthread versions on Windows // Fix deprecation warnings with recent pthread versions on Windows
#ifdef _PTW32_STATIC_LIB #if defined(_PTW32_STATIC_LIB) && defined(WIN)
#if PTW32_VERSION =< 2, 8, 0, 0 #if PTW32_VERSION <= 2, 8, 0, 0
#define PTW32_STATIC_LIB #define PTW32_STATIC_LIB
#endif #endif
#endif #endif