From f1a098203be8c44a52ed5d2a72982a3f634d4df6 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 2 Jan 2017 16:42:09 +0200 Subject: py: Move helpers to the pykms module Instead of forcing applications to import the helpers manually, move them to pykms by turning it into a python module. Signed-off-by: Laurent Pinchart --- py/pykms/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'py/pykms/CMakeLists.txt') diff --git a/py/pykms/CMakeLists.txt b/py/pykms/CMakeLists.txt index 3e6e0e1..a671b7a 100644 --- a/py/pykms/CMakeLists.txt +++ b/py/pykms/CMakeLists.txt @@ -21,6 +21,10 @@ target_link_libraries(pykms kms++ kms++util ${LIBDRM_LIBRARIES}) # Don't add a 'lib' prefix to the shared library set_target_properties(pykms PROPERTIES PREFIX "") +set_target_properties(pykms PROPERTIES LIBRARY_OUTPUT_DIRECTORY "") -# XXX Where should pykms.so be installed? -#install(TARGETS pykms DESTINATION lib) +configure_file(__init__.py __init__.py COPYONLY) + +set(PY_DESTDIR lib/python${PYTHON_VERSION}/site-packages/pykms) +install(FILES __init__.py DESTINATION ${PY_DESTDIR}) +install(TARGETS pykms DESTINATION ${PY_DESTDIR}) -- cgit v1.2.3