aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2019-09-08 15:17:54 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2019-09-08 15:17:54 +0300
commitb5f340c46442cc4ddea6263a897ff3c56a1b87d4 (patch)
tree39959107e379d019ee70caa49da3ef1ad6fead7e
parentAdd openssl key generation step to meson.build (diff)
downloadsmolbote-b5f340c46442cc4ddea6263a897ff3c56a1b87d4.tar.xz
Remove gen-qtcreator-config.py
-rw-r--r--meson.build6
-rwxr-xr-xtools/gen-qtcreator-config.py65
2 files changed, 0 insertions, 71 deletions
diff --git a/meson.build b/meson.build
index a2b5a17..4a06b1d 100644
--- a/meson.build
+++ b/meson.build
@@ -5,12 +5,6 @@ project('smolbote', 'cpp',
meson_version: '>=0.49.0'
)
-# autogenerate qtcreator project files
-# add_postconf_script(script_name, arg1, arg2, ...)
-# will run the executable given as an argument after all project files have been generated.
-# This script will have the environment variables MESON_SOURCE_ROOT and MESON_BUILD_ROOT set.
-#meson.add_postconf_script('tools/gen-qtcreator-config.py', '--prefix=../smolbote', '.')
-
# add -DQT_NO_DEBUG to non-debug builds
if not get_option('debug')
add_project_arguments('-DQT_NO_DEBUG', language: 'cpp')
diff --git a/tools/gen-qtcreator-config.py b/tools/gen-qtcreator-config.py
deleted file mode 100755
index 3035fdb..0000000
--- a/tools/gen-qtcreator-config.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env python3
-
-import argparse
-import subprocess
-import os
-import json
-
-def readable_dir(prospective_dir):
- if not os.path.isdir(prospective_dir):
- raise Exception("readable_dir:{0} is not a valid path".format(prospective_dir))
- if os.access(prospective_dir, os.R_OK):
- return prospective_dir
- else:
- raise Exception("readable_dir:{0} is not a readable dir".format(prospective_dir))
-
-
-parser = argparse.ArgumentParser(description='Generate QtCreator profject files')
-parser.add_argument('--prefix', type=str, default='project', help='Project name prefix')
-parser.add_argument('builddir', type=readable_dir, default='.', help='Build directory')
-
-args = parser.parse_args()
-
-# get targets
-targets_json = json.loads(subprocess.run(['meson', 'introspect', '--targets', args.builddir], stdout=subprocess.PIPE).stdout.decode('utf8'))
-
-#s = json.dumps(targets_json, indent=4)
-#print(s)
-
-targets = []
-for target in targets_json:
- targets.append(target['id'])
-
-# prefix.files
-with open(args.prefix + '.files', 'w') as output:
- for target in targets:
- files_json = json.loads(subprocess.run(['meson', 'introspect', '--target-files', target, args.builddir], stdout=subprocess.PIPE).stdout.decode('utf8'))
- for f in files_json:
- output.write(f + '\n')
-
-# includes
-incs = set()
-defs = set()
-
-deps_json = json.loads(subprocess.run(['meson', 'introspect', '--dependencies', args.builddir], stdout=subprocess.PIPE).stdout.decode('utf8'))
-for dep in deps_json:
- for arg in dep['compile_args']:
- if arg.startswith('-I'):
- incs.add(arg)
- elif arg.startswith('-D'):
- defs.add(arg)
-
-# prefix.includes
-with open(args.prefix + '.includes', 'w') as output:
- # dependency includes
- for include in incs:
- output.write(include[2:] + '\n')
-
- # TODO: properly grab autogenerated include locations
- for target in targets_json:
- output.write(os.path.join(args.builddir, os.path.dirname(target['filename']), target['id']) + '\n')
-
-# prefix.config
-with open(args.prefix + '.config', 'w') as output:
- for define in defs:
- output.write('#define ' + define[2:] + '\n')