forked from epoupon/fileshelter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (34 loc) · 1.23 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.12)
project(fileshelter)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules/)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
include(CTest)
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
find_package(Filesystem REQUIRED)
find_package(Boost REQUIRED COMPONENTS system program_options)
find_package(Wt REQUIRED COMPONENTS Wt Dbo DboSqlite3 HTTP)
pkg_check_modules(Config++ REQUIRED IMPORTED_TARGET libconfig++)
pkg_check_modules(Archive REQUIRED IMPORTED_TARGET libarchive)
# WT
if (NOT Wt_FOUND)
message(FATAL_ERROR "Wt package not found!")
endif ()
if (NOT TARGET Wt::Wt)
message(FATAL_ERROR "Cannot find Wt::Wt!")
endif ()
if (NOT TARGET Wt::Dbo)
message(FATAL_ERROR "Cannot find Wt::Dbo!")
endif ()
if (NOT TARGET Wt::DboSqlite3)
message(FATAL_ERROR "Cannot find Wt::DboSqlite3!")
endif ()
if (NOT TARGET Wt::HTTP)
message(FATAL_ERROR "Cannot find Wt::HTTP!")
endif ()
add_subdirectory(src)
install(DIRECTORY approot DESTINATION share/fileshelter)
install(DIRECTORY docroot DESTINATION share/fileshelter)
install(FILES conf/systemd/default.service DESTINATION share/fileshelter)
install(FILES conf/fileshelter.conf DESTINATION share/fileshelter)