Damjan Marion | 0abd4a2 | 2018-08-28 12:57:29 +0200 | [diff] [blame] | 1 | # 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 Marion | 16cc15b | 2023-02-15 22:10:05 +0100 | [diff] [blame^] | 14 | find_package( |
| 15 | Python3 |
| 16 | REQUIRED |
| 17 | COMPONENTS Interpreter |
| 18 | ) |
| 19 | |
| 20 | execute_process( |
| 21 | COMMAND ${Python3_EXECUTABLE} -c "import ply" |
| 22 | RESULT_VARIABLE _rv |
| 23 | OUTPUT_QUIET |
| 24 | ) |
| 25 | |
| 26 | if (NOT ${_rv} EQUAL 0) |
| 27 | message( FATAL_ERROR "The \"ply\" Python3 package is not installed.") |
| 28 | endif() |
| 29 | |
Damjan Marion | 5ad62c3 | 2018-08-30 22:56:10 +0200 | [diff] [blame] | 30 | install( |
| 31 | FILES vppapigen.py |
| 32 | RENAME vppapigen |
Damjan Marion | 599efc6 | 2020-05-07 16:49:45 +0200 | [diff] [blame] | 33 | DESTINATION ${VPP_RUNTIME_DIR} |
Damjan Marion | 5ad62c3 | 2018-08-30 22:56:10 +0200 | [diff] [blame] | 34 | PERMISSIONS |
| 35 | OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE |
| 36 | WORLD_READ WORLD_EXECUTE |
Damjan Marion | 833de8c | 2018-09-07 12:39:02 +0200 | [diff] [blame] | 37 | COMPONENT vpp-dev |
Damjan Marion | 5ad62c3 | 2018-08-30 22:56:10 +0200 | [diff] [blame] | 38 | ) |
| 39 | |
Vratko Polak | 7f37a94 | 2019-07-24 13:42:36 +0200 | [diff] [blame] | 40 | install( |
| 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 | ) |