Permalink
Browse files

Fix setup.py, add missing libraries for windows

  • Loading branch information...
Awarua- committed Apr 24, 2017
1 parent 0d71e80 commit 8fa62f8d2b3388b7c5dc3556745fbb969eebcb5b
Showing with 27 additions and 16 deletions.
  1. +27 −16 bindings/Python/cython/setup.py
@@ -3,46 +3,57 @@
from Cython.Distutils import build_ext
import platform
libpointing='../../../'
libpointing = '../../../'
if platform.system() == 'Darwin':
system = platform.system()
if system == 'Darwin':
ext_modules = [Extension(
"pylibpointing",
"pylibpointing",
["pylibpointing.pyx"],
language="c++",
language="c++",
libraries=['pointing'],
include_dirs=[libpointing],
library_dirs=["./",libpointing+"pointing"],
extra_compile_args=["-stdlib=libc++", "-mmacosx-version-min=10.7", "-std=c++11"],
extra_link_args=["-mmacosx-version-min=10.7", "-framework", "CoreGraphics"],
)]
elif platform.system() == 'Linux':
elif system == 'Linux':
ext_modules = [Extension(
"pylibpointing",
"pylibpointing",
["pylibpointing.pyx"],
language="c++",
language="c++",
libraries=['pointing', "stdc++", "udev", "X11", "Xrandr"],
include_dirs=[
libpointing
],
library_dirs=["./"]
)
]
)]
elif system == 'Windows':
ext_modules = [Extension(
"pylibpointing",
["pylibpointing.pyx"],
language="c++",
libraries=['pointing', "user32", "advapi32", "setupapi", "hid"],
include_dirs=[
libpointing
],
library_dirs=["./"]
)]
else:
ext_modules = [Extension(
"pylibpointing",
"pylibpointing",
["pylibpointing.pyx"],
language="c++",
language="c++",
libraries=['pointing', "stdc++"],
include_dirs=[
libpointing
],
library_dirs=["./"]
)
]
)]
setup(
name = 'pylibpointing',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
name='pylibpointing',
cmdclass={'build_ext': build_ext},
ext_modules=ext_modules
)

0 comments on commit 8fa62f8

Please sign in to comment.