forked from dusty-nv/jetson-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (28 loc) · 1.11 KB
/
CMakeLists.txt
File metadata and controls
34 lines (28 loc) · 1.11 KB
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
#
# This list contains the versions of Python that will be detected
# and the bindings built against (if that version is installed).
#
# If you want to support another version of Python, add it here.
#
if(LSB_RELEASE_CODENAME MATCHES "noble")
set(PYTHON_BINDING_VERSIONS 3.12)
elseif(LSB_RELEASE_CODENAME MATCHES "jammy")
set(PYTHON_BINDING_VERSIONS 3.10)
elseif(LSB_RELEASE_CODENAME MATCHES "focal")
set(PYTHON_BINDING_VERSIONS 3.8)
else()
set(PYTHON_BINDING_VERSIONS 2.7 3.6 3.7 3.8 3.10 3.12)
endif()
message("-- trying to build Python bindings for Python versions: ${PYTHON_BINDING_VERSIONS}")
foreach(PYTHON_BINDING_VERSION ${PYTHON_BINDING_VERSIONS})
add_subdirectory(bindings bindings_python_${PYTHON_BINDING_VERSION})
endforeach()
#
# install Python examples
#
file(GLOB pyUtilExamples examples/*.py examples/*.sh)
foreach(pyExample ${pyUtilExamples})
message("-- Copying ${pyExample}")
file(COPY ${pyExample} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
install(FILES "${pyExample}" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endforeach()