diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-05-17 22:24:50 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-05-17 22:24:50 +0300 |
commit | 446a36887bc9ac280ac9fb73222fa77c1c4a8e7a (patch) | |
tree | 9142c945898dbaebbd1af791a1efc6c563cb34b0 /lib | |
parent | Merge branch 'master' of origin (diff) | |
download | smolbote-446a36887bc9ac280ac9fb73222fa77c1c4a8e7a.tar.xz |
Add openssl key generation step to meson.build
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pluginloader/meson.build | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/pluginloader/meson.build b/lib/pluginloader/meson.build index 4786156..9334f24 100644 --- a/lib/pluginloader/meson.build +++ b/lib/pluginloader/meson.build @@ -1,5 +1,17 @@ dep_openssl = dependency('openssl') +openssl_exe = find_program('openssl', required: true) +sh = find_program('sh') +hexdump = meson.source_root() / 'tools/hexdump.py' + +publickey = custom_target('publicKey.h', + output: 'publicKey.h', + build_by_default: true, + command: [sh, '-c', + openssl_exe.path() + ' genrsa -out privateKey.pem 4096; ' + openssl_exe.path() + ' rsa -in privateKey.pem -pubout -out publicKey.pem; python3 ' + hexdump + ' --name=publicKey_pem publicKey.pem --output=@OUTPUT@' + ] +) + pluginloader_moc = mod_qt5.preprocess( moc_headers: ['pluginloader.h'], dependencies: dep_qt5 @@ -9,5 +21,7 @@ dep_pluginloader = declare_dependency( include_directories: include_directories('.'), link_with: static_library('plugin', ['pluginloader.cpp', pluginloader_moc], + include_directories: include_directories('.'), dependencies: [dep_qt5, dep_openssl, dep_genheaders]) ) + |