summaryrefslogtreecommitdiff
path: root/backend/CMakeLists.txt
blob: f2eae869dd0d10df28b9c55a8c4d8953529ee581 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

find_package(PkgConfig REQUIRED)
pkg_check_modules(deps REQUIRED IMPORTED_TARGET glib-2.0)

add_library(backend)
target_sources(backend
	INTERFACE job.h utils.h pkgtools.h slackpkg.h dl.h
	PRIVATE job.cc utils.cc pkgtools.cc slackpkg.cc dl.cc
)

target_link_libraries(backend PkgConfig::deps)
# curl_dep = meson.get_compiler('c').find_library('curl')
# bzip2_dep = dependency('bzip2')

# packagekit_backend_slack_module = shared_module(
#   'pk_backend_slack',
#   'pk-backend-slack.cc',
#   'utils.cc',
#   'pkgtools.cc',
#   'slackpkg.cc',
#   'dl.cc',
#   'job.cc',
#   include_directories: packagekit_src_include,
#   dependencies: [
#     packagekit_glib2_dep,
#     curl_dep,
#     gmodule_dep,
# 	sqlite3_dep,
# 	bzip2_dep,
#   ],
#   cpp_args: [
#     '-DG_LOG_DOMAIN="PackageKit-Slackware"',
#     '-DLOCALSTATEDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('localstatedir'))),
#     '-DLIBDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))),
#     '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir')),
#   ],
#   override_options: ['c_std=c14', 'cpp_std=c++14'],
#   install: true,
#   install_dir: pk_plugin_dir,
# )

# configure_file(
#   input: 'Slackware.conf.in',
#   output: 'Slackware.conf',
#   configuration: slackware_config_data,
#   install: true,
#   install_dir: join_paths(get_option('sysconfdir'), 'PackageKit'),
# )

# install_data(
#   'metadata.db',
#   install_dir: join_paths(get_option('localstatedir'), 'cache', 'PackageKit', 'metadata'),
# )