Browse Source

Add openssl key generation step to meson.build

master
Aqua-sama 7 months ago
parent
commit
446a36887b
Signed by: Aqua-sama <aqua@iserlohn-fortress.net> GPG Key ID: 5378B8349C1D5ADA
2 changed files with 15 additions and 3 deletions
  1. +1
    -3
      configure
  2. +14
    -0
      lib/pluginloader/meson.build

+ 1
- 3
configure View File

@@ -2,8 +2,6 @@
import shutil
import os
import subprocess
from colorama import Fore
from colorama import Style

def concat_options(default, options=[]):
if not options:
@@ -58,7 +56,7 @@ if __name__ == "__main__":
'-DBreakpad={}'.format(f_breakpad), '-DPlasma={}'.format(f_plasma), '-Dmanpage={}'.format(f_manpage),
build_dir], env=env, check=True)

print(f"{Style.BRIGHT}Configure step complete{Style.RESET_ALL}")
print("\n\n--- Configure step complete ---")
print("For more configuration options run 'meson configure' in the configured build directory.")
print("You can now build with 'ninja -C {}'.".format(build_dir))


+ 14
- 0
lib/pluginloader/meson.build View File

@@ -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])
)


Loading…
Cancel
Save