forked from duckietown/apriltags3-py
-
Notifications
You must be signed in to change notification settings - Fork 29
/
setup.py
28 lines (23 loc) · 945 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import platform
from setuptools import find_packages
from skbuild import setup
package_dir = "src"
package = "pupil_apriltags"
cmake_args = []
if platform.system() == "Windows":
import pupil_pthreads_win as ptw
cmake_args.append(f"-DPTHREADS_WIN_INCLUDE_DIR='{ptw.include_path}'")
cmake_args.append(f"-DPTHREADS_WIN_IMPORT_LIB_PATH='{ptw.import_lib_path}'")
# The Ninja cmake generator will use mingw (gcc) on windows travis instances, but we
# need to use msvc for compatibility. The easiest solution I found was to just use
# the vs cmake generator as it defaults to msvc.
cmake_args.append("-GVisual Studio 17 2022")
cmake_args.append("-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True")
setup(
packages=find_packages(where="src"),
package_dir={"": "src"},
include_package_data=False,
cmake_args=cmake_args,
cmake_source_dir="src/pupil_apriltags",
cmake_install_dir="src/pupil_apriltags",
)