-
Notifications
You must be signed in to change notification settings - Fork 290
/
CMakeLists.txt
32 lines (26 loc) · 1.02 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
#
# 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 "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)
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()