summaryrefslogtreecommitdiff
path: root/backend/CMakeLists.txt
blob: fe2bfbf5d77f72765aa2ce33c24acd43fc64b247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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)
find_package(SQLite3)
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 ${SQLite3_LIBRARIES})

file(COPY metadata.db DESTINATION ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LOCALSTATEDIR})