From 29b9db8d67c67d4d1303e8dd9804f698fbaefbe1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 13 Jan 2017 19:37:37 +0000 Subject: Bindings: Add a script to generate __init__.py file for bindings Packagers can execute this script with cmake -D PYTHON_UMBRELLA_MODULE_FILE=/where/ever/PyKF5/__init__.py -P /path/to/ECM/find-modules/GeneratePythonBindingUmbrellaModule.cmake Soon, this is likely to do more than create an empty file. --- find-modules/GeneratePythonBindingUmbrellaModule.cmake | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 find-modules/GeneratePythonBindingUmbrellaModule.cmake (limited to 'find-modules/GeneratePythonBindingUmbrellaModule.cmake') diff --git a/find-modules/GeneratePythonBindingUmbrellaModule.cmake b/find-modules/GeneratePythonBindingUmbrellaModule.cmake new file mode 100644 index 00000000..35bbc2c5 --- /dev/null +++ b/find-modules/GeneratePythonBindingUmbrellaModule.cmake @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.2) + +get_filename_component(PYTHON_UMBRELLA_MODULE_DIR ${PYTHON_UMBRELLA_MODULE_FILE} PATH) + +file(MAKE_DIRECTORY "${PYTHON_UMBRELLA_MODULE_DIR}") + +execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${PYTHON_UMBRELLA_MODULE_FILE}") -- cgit v1.2.1