-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathCMakeLists.txt
70 lines (59 loc) · 1.89 KB
/
CMakeLists.txt
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
cmake_minimum_required(VERSION 3.1)
project(pyserial NONE)
find_package(MBCMakeTools REQUIRED NO_POLICY_SCOPE)
set(pyserial_sources
serial/serialposix.py
serial/urlhandler/protocol_socket.py
serial/urlhandler/protocol_loop.py
serial/urlhandler/protocol_hwgrep.py
serial/urlhandler/protocol_rfc2217.py
serial/urlhandler/__init__.py
serial/rfc2217.py
serial/serialwin32.py
serial/serialjava.py
serial/tools/list_ports_posix.py
serial/tools/list_ports.py
serial/tools/miniterm.py
serial/tools/list_ports_windows.py
serial/tools/__init__.py
serial/tools/list_ports_osx.py
serial/tools/list_ports_vid_pid_osx_posix.py
serial/win32.py
serial/__init__.py
serial/sermsdos.py
serial/serialutil.py
serial/serialcli.py)
# Build a python2.7 egg for conveyor
build_egg(
pyserial
SETUP_PY ${PROJECT_SOURCE_DIR}/setup.py
SOURCES ${pyserial_sources}
EGG_NAME egg_name
EGG egg)
install(
FILES ${egg}
DESTINATION ${EGG_INSTALL_DIR})
# Bulid a python3.4 wheel for usb-microdaemon
build_wheel(
pyserial34
SETUP_PY ${PROJECT_SOURCE_DIR}/setup.py
SOURCES ${pyserial_sources}
WHEEL_NAME wheel_name
WHEEL wheel)
# Also create a .pth file so that we can import the egg without
# manually adding it to the path (see the docs for site.py).
# TODO(chris): Resolve python3 issues and use mustache here
set(pyserial_pth "${PROJECT_BINARY_DIR}/pyserial.pth")
configure_file("${PROJECT_SOURCE_DIR}/pyserial.pth.in" "${pyserial_pth}")
install(
FILES ${wheel} ${pyserial_pth}
DESTINATION ${PY34_MODULE_DIR})
# For now we only export the path to the egg in our config,
# since I don't know if we actually need to export the wheel
generate_and_install_config(
NAME Pyserial
ADDITIONAL_PATHS
pyserial ${EGG_INSTALL_DIR}/${egg_name})
enable_testing()
add_subdirectory(test)
add_subdirectory(documentation)