aboutsummaryrefslogtreecommitdiff
path: root/lib/pluginloader/meson.build
blob: 9334f241d3e1f3c523f86878d555b47864782c97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
)

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