-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
55 lines (48 loc) · 1.4 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.13)
cmake_policy(VERSION 3.13)
project(fty_srr_rest
VERSION "1.0.0"
DESCRIPTION "Save, restore and reset REST API for 42ity project"
LANGUAGES CXX)
##############################################################################################################
find_package(fty-cmake PATHS ${CMAKE_BINARY_DIR}/fty-cmake)
find_package(fty-cmake-rest PATHS ${CMAKE_BINARY_DIR}/fty-cmake-rest)
resolve_lib(tntnet)
##############################################################################################################
# Define the servlet
etn_target(shared ${PROJECT_NAME}
SOURCES
src/fty_srr_helpers.cc
src/fty_srr_helpers.h
USES
czmq
fty-cmake-rest
cxxtools
tntnet
tntdb
fty_common
fty_common_logging
fty_common_rest
fty_common_messagebus
fty_common_dto
)
# Get the ecpp
file(GLOB ECPP_FILES
ecpp/*.ecpp
)
# Transform ecpp files
fty_ecppbuilder(
TARGET ${PROJECT_NAME}
WORKDIR src
ECPP
${ECPP_FILES}
)
# Install tntnet mapping file in etc/tntnet/bios.d/
install(FILES ${PROJECT_SOURCE_DIR}/resources/40_srr-rest.xml DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/tntnet/bios.d/)
etn_test_target(${PROJECT_NAME}
SOURCES
tests/*.cc
PREPROCESSOR -DCATCH_CONFIG_FAST_COMPILE
USES
stdc++fs
)