summaryrefslogtreecommitdiff
path: root/backend/CMakeLists.txt
blob: da37652ef1278f0200c289bd67f0cfb2e6966430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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)
find_package(Boost REQUIRED COMPONENTS filesystem process)
pkg_check_modules(deps REQUIRED IMPORTED_TARGET 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} Boost::filesystem Boost::process)

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