diff options
author | Stephen Kelly <steveire@gmail.com> | 2017-01-13 19:37:37 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2017-01-13 19:41:14 +0000 |
commit | 29b9db8d67c67d4d1303e8dd9804f698fbaefbe1 (patch) | |
tree | 8817facd387fda7ce755ea5fcc86437f7bea2d8e /find-modules/GeneratePythonBindingUmbrellaModule.cmake | |
parent | 173d9984ef62c07b331f4cb1e6138e8993dfb92f (diff) | |
download | extra-cmake-modules-29b9db8d67c67d4d1303e8dd9804f698fbaefbe1.tar.gz extra-cmake-modules-29b9db8d67c67d4d1303e8dd9804f698fbaefbe1.tar.bz2 |
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.
Diffstat (limited to 'find-modules/GeneratePythonBindingUmbrellaModule.cmake')
-rw-r--r-- | find-modules/GeneratePythonBindingUmbrellaModule.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
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}") |