blob: c6fd9fa3dedb903511d513aadd2b64cb4efc493e [file] [log] [blame]
Damjan Marion0fa900e2018-09-12 12:12:36 +02001# Copyright (c) 2018 Cisco and/or its affiliates.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at:
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
15
16find_path(VPP_INCLUDE_DIR PATH_SUFFIXES NAMES vppinfra/clib.h)
17find_program(VPP_APIGEN vppapigen)
18
19if(VPP_INCLUDE_DIR AND VPP_APIGEN)
20 include_directories (${VPP_INCLUDE_DIR})
21else()
22 message(FATAL_ERROR "VPP headers, libraries and/or tools not found")
23endif()
24
25set(VPP_EXTERNAL_PROJECT 1)
26
27include(CheckCCompilerFlag)
28
29check_c_compiler_flag("-Wno-address-of-packed-member" compiler_flag_no_address_of_packed_member)
30if (compiler_flag_no_address_of_packed_member)
31 add_definitions(-Wno-address-of-packed-member)
32endif()
33
34include(CheckCCompilerFlag)
35include(${CMAKE_CURRENT_LIST_DIR}/cpu.cmake)
36include(${CMAKE_CURRENT_LIST_DIR}/api.cmake)
37include(${CMAKE_CURRENT_LIST_DIR}/library.cmake)
38include(${CMAKE_CURRENT_LIST_DIR}/plugin.cmake)
Damjan Marioneeadc142018-09-13 20:02:12 +020039include(${CMAKE_CURRENT_LIST_DIR}/pack.cmake)