blob: 04ebed54862fffe33b2ed7abd3ba5ad62987bf49 [file] [log] [blame]
Damjan Marion0abd4a22018-08-28 12:57:29 +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
Damjan Marion16cc15b2023-02-15 22:10:05 +010014find_package(
15 Python3
16 REQUIRED
17 COMPONENTS Interpreter
18)
19
20execute_process(
21 COMMAND ${Python3_EXECUTABLE} -c "import ply"
22 RESULT_VARIABLE _rv
23 OUTPUT_QUIET
24)
25
26if (NOT ${_rv} EQUAL 0)
27 message( FATAL_ERROR "The \"ply\" Python3 package is not installed.")
28endif()
29
Damjan Marion5ad62c32018-08-30 22:56:10 +020030install(
31 FILES vppapigen.py
32 RENAME vppapigen
Damjan Marion599efc62020-05-07 16:49:45 +020033 DESTINATION ${VPP_RUNTIME_DIR}
Damjan Marion5ad62c32018-08-30 22:56:10 +020034 PERMISSIONS
35 OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
36 WORLD_READ WORLD_EXECUTE
Damjan Marion833de8c2018-09-07 12:39:02 +020037 COMPONENT vpp-dev
Damjan Marion5ad62c32018-08-30 22:56:10 +020038)
39
Vratko Polak7f37a942019-07-24 13:42:36 +020040install(
41 FILES
42 vppapigen_c.py
43 vppapigen_json.py
44 generate_json.py
45 DESTINATION
46 share/vpp
47 COMPONENT
48 vpp-dev
49)