1338bf337Smrg# Copyright © 2018 Intel Corporation 2338bf337Smrg 3338bf337Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy 4338bf337Smrg# of this software and associated documentation files (the "Software"), to deal 5338bf337Smrg# in the Software without restriction, including without limitation the rights 6338bf337Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7338bf337Smrg# copies of the Software, and to permit persons to whom the Software is 8338bf337Smrg# furnished to do so, subject to the following conditions: 9338bf337Smrg 10338bf337Smrg# The above copyright notice and this permission notice shall be included in 11338bf337Smrg# all copies or substantial portions of the Software. 12338bf337Smrg 13338bf337Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14338bf337Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15338bf337Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16338bf337Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17338bf337Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18338bf337Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19338bf337Smrg# SOFTWARE. 20338bf337Smrg 2114b11b2bSmrgextra_demo_cflags = [] 2214b11b2bSmrgif cc.get_argument_syntax() == 'msvc' 2314b11b2bSmrg extra_demo_cflags = ['-D_USE_MATH_DEFINES'] 2414b11b2bSmrgendif 2514b11b2bSmrg 26338bf337Smrgdemos = [ 27338bf337Smrg 'gradient-test', 28338bf337Smrg 'alpha-test', 29338bf337Smrg 'composite-test', 30338bf337Smrg 'clip-test', 31338bf337Smrg 'trap-test', 32338bf337Smrg 'screen-test', 33338bf337Smrg 'convolution-test', 34338bf337Smrg 'radial-test', 35338bf337Smrg 'linear-gradient', 36338bf337Smrg 'conical-test', 37338bf337Smrg 'tri-test', 38338bf337Smrg 'checkerboard', 39338bf337Smrg 'srgb-test', 40338bf337Smrg 'srgb-trap-test', 41338bf337Smrg 'scale', 4214b11b2bSmrg 'dither', 43338bf337Smrg] 44338bf337Smrg 45338bf337Smrgif dep_gtk.found() 46338bf337Smrg 47338bf337Smrg libdemo = static_library( 48338bf337Smrg 'demo', 49338bf337Smrg ['gtk-utils.c', config_h, version_h], 5014b11b2bSmrg dependencies : [libtestutils_dep, dep_gtk, dep_glib, dep_png, dep_m, dep_openmp], 51338bf337Smrg include_directories : inc_pixman, 52338bf337Smrg ) 53338bf337Smrg 54338bf337Smrg if dep_gtk.found() 55338bf337Smrg foreach d : demos 56338bf337Smrg executable( 57338bf337Smrg d, 58338bf337Smrg [d + '.c', config_h, version_h], 5914b11b2bSmrg c_args : extra_demo_cflags, 6014b11b2bSmrg link_with : [libdemo], 6114b11b2bSmrg dependencies : [idep_pixman, libtestutils_dep, dep_glib, dep_gtk, dep_openmp, dep_png], 62338bf337Smrg ) 63338bf337Smrg endforeach 64338bf337Smrg endif 65338bf337Smrg 66338bf337Smrgendif 67