diff --git a/cmake/Python/__init__.py b/cmake/Python/__init__.py new file mode 100644 index 00000000..d666bcd4 --- /dev/null +++ b/cmake/Python/__init__.py @@ -0,0 +1,2 @@ +# Automatically import all openshot objects when this module is imported +from openshot import * diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f8778af0..47cac535 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -81,6 +81,7 @@ SWIG_LINK_LIBRARIES(openshot ${PYTHON_LIBRARIES} openshot) file(GLOB_RECURSE headers ${CMAKE_SOURCE_DIR}/include/*.h) INSTALL(FILES ${headers} DESTINATION include/libopenshot) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/openshot.py DESTINATION share/python/libopenshot) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/cmake/Python/__init__.py DESTINATION share/python/libopenshot) IF (UNIX) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenshot.so DESTINATION lib) @@ -95,4 +96,4 @@ ELSE (UNIX) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/_openshot.so DESTINATION share/python) ENDIF(APPLE) ENDIF(WIN32) -ENDIF(UNIX) \ No newline at end of file +ENDIF(UNIX)