1# Copyright © 2018 Intel Corporation 2# 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# cmocka rather annoyingly uses different standards for different platforms. 16_overrides = [] 17if host_machine.system() != 'windows' 18 _overrides += 'c_std=gnu99' 19endif 20 21libcmocka = library( 22 'cmocka', 23 ['cmocka.c'], 24 c_args : '-DHAVE_CONFIG_H=1', 25 include_directories : [inc_include, inc_private], 26 vs_module_defs : 'cmocka.def', 27 soversion : host_machine.system() != 'windows' ? lib_version.split('.')[0] : '', 28 version : lib_version, 29 install : false, 30 override_options : _overrides, 31 build_by_default: false, 32) 33 34libcmocka_native = library( 35 'cmocka_native', 36 ['cmocka.c'], 37 c_args : '-DHAVE_CONFIG_H=1', 38 include_directories : [inc_include, inc_private_native], 39 vs_module_defs : 'cmocka.def', 40 soversion : build_machine.system() != 'windows' ? lib_version.split('.')[0] : '', 41 version : lib_version, 42 install : false, # Cannot install native targets in cross builds 43 override_options : _overrides, 44 native: true, 45 build_by_default: false, 46) 47