summaryrefslogtreecommitdiff
path: root/backend/CMakeLists.txt
blob: 259a3c68040216667fadf2443829a6039d0bd657 (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
# 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(CURL)
find_package(PkgConfig REQUIRED)
pkg_check_modules(deps REQUIRED IMPORTED_TARGET glib-2.0 gio-2.0 bzip2)

add_library(backend)
target_sources(backend
	PUBLIC FILE_SET all_my_modules
	TYPE CXX_MODULES FILES job.cpp slackpkg.cpp pkgtools.cpp utils.cpp
)

configure_file(config.h.in ${CMAKE_BINARY_DIR}/generated/config.h)
include_directories(${CMAKE_BINARY_DIR}/generated/)

target_link_libraries(backend PkgConfig::deps CURL::libcurl)

# 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'),
# )