fix mac osx compilation
This commit is contained in:
@@ -2007,12 +2007,16 @@ typedef khronos_ssize_t GLsizeiptr;
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef long GLintptrARB;
|
||||
#else
|
||||
#ifndef __gltypes_h_
|
||||
typedef ptrdiff_t GLintptrARB;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1060)
|
||||
typedef long GLsizeiptrARB;
|
||||
#else
|
||||
#ifndef __gltypes_h_
|
||||
typedef ptrdiff_t GLsizeiptrARB;
|
||||
#endif
|
||||
#endif
|
||||
typedef int64_t GLint64EXT;
|
||||
typedef uint64_t GLuint64EXT;
|
||||
|
||||
4
setup.py
4
setup.py
@@ -50,7 +50,7 @@ def parallelCCompile(self,
|
||||
newcc_args = cc_args
|
||||
if _platform == "darwin":
|
||||
if src.endswith('.cpp'):
|
||||
newcc_args = cc_args + ["-stdlib=libc++"]
|
||||
newcc_args = cc_args + ["-mmacosx-version-min=10.7", "-stdlib=libc++"]
|
||||
self._compile(obj, src, ext, newcc_args, extra_postargs, pp_opts)
|
||||
|
||||
# convert to list, imap is evaluated on-demand
|
||||
@@ -417,7 +417,7 @@ elif _platform == "win32":
|
||||
+["examples/ThirdPartyLibs/glad/gl.c"]
|
||||
elif _platform == "darwin":
|
||||
print("darwin!")
|
||||
os.environ['LDFLAGS'] = '-framework Cocoa -stdlib=libc++ -framework OpenGL'
|
||||
os.environ['LDFLAGS'] = '-framework Cocoa -mmacosx-version-min=10.7 -stdlib=libc++ -framework OpenGL'
|
||||
CXX_FLAGS += '-DB3_NO_PYTHON_FRAMEWORK '
|
||||
CXX_FLAGS += '-DHAS_SOCKLEN_T '
|
||||
CXX_FLAGS += '-D_DARWIN '
|
||||
|
||||
Reference in New Issue
Block a user