1# Copyright © 2020-2021 Collabora, Ltd. 2# Author: Antonio Caggiano <antonio.caggiano@collabora.com> 3# 4# SPDX-License-Identifier: MIT 5 6pps_sources = [ 7 'pps.cc', 8 'pps_device.cc', 9 'pps_driver.cc', 10 'pps_counter.cc', 11] 12 13include_pps = include_directories('../') 14 15dep_drm = dependency('libdrm') 16pps_deps = [dep_drm, dep_perfetto] 17pps_deps += pps_datasources 18 19lib_pps = static_library( 20 'pps', 21 sources: pps_sources, 22 include_directories: [include_pps, inc_src, pps_includes], 23 dependencies: pps_deps, 24 override_options: ['cpp_std=c++17'], 25) 26 27dep_pps = declare_dependency( 28 link_with: lib_pps, 29 include_directories: [include_pps, inc_src] 30) 31 32producer_sources = [ 33 'pps_datasource.cc', 34 'pps_producer.cc' 35] 36 37executable( 38 'pps-producer', 39 sources: producer_sources, 40 include_directories: [include_pps, inc_src], 41 dependencies: [dep_pps, dep_perfetto], 42 override_options: ['cpp_std=c++17'], 43 install: true 44) 45 46config_sources = [ 47 'pps_config.cc' 48] 49 50dep_docopt = dependency('docopt', required: false) 51 52if dep_docopt.found() 53 executable( 54 'pps-config', 55 sources: config_sources, 56 include_directories: [include_pps, inc_src], 57 dependencies: [dep_pps, dep_docopt], 58 override_options: ['cpp_std=c++17'], 59 install: true 60 ) 61endif 62