6dddc67298d745462f679fd751445275e67d3bc1
[vpp.git] / src / plugins / wireguard / CMakeLists.txt
1
2 # Copyright (c) 2020 Doc.ai and/or its affiliates.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 if (OPENSSL_VERSION VERSION_LESS 1.1.0)
16   return()
17 endif()
18
19 include_directories(${OPENSSL_INCLUDE_DIR})
20
21 list(APPEND WG_BLAKE_SOURCES
22   blake/blake2s.h
23   blake/blake2s.c
24 )
25
26 add_vpp_plugin(wireguard
27   SOURCES
28   ${WG_BLAKE_SOURCES}
29   wireguard.c
30   wireguard.h
31   wireguard_if.c
32   wireguard_if.h
33   wireguard_input.c
34   wireguard_output_tun.c
35   wireguard_handoff.c
36   wireguard_key.c
37   wireguard_key.h
38   wireguard_cli.c
39   wireguard_messages.h
40   wireguard_noise.c
41   wireguard_noise.h
42   wireguard_send.c
43   wireguard_send.h
44   wireguard_cookie.c
45   wireguard_cookie.h
46   wireguard_peer.c
47   wireguard_peer.h
48   wireguard_timer.c
49   wireguard_timer.h
50   wireguard_index_table.c
51   wireguard_index_table.h
52   wireguard_api.c
53
54   LINK_LIBRARIES ${OPENSSL_LIBRARIES}
55
56   API_FILES
57   wireguard.api
58
59 )