piso/meson.build
project('piso', 'cpp')
run_command('wxrc', 'gui.xrc', '-v', '-c','-o','gui.cpp', check: true)
extra_args= []
boost = dependency('boost')
wxwidgets = dependency('wxwidgets', version : '>=3.0.0', modules : ['std', 'stc'])
miniupnpc =dependency('miniupnpc')
if miniupnpc.found()
message('** Dynamic linking of miniupnpc. If you want to get static binding use the makefile . **')
else
message ('Please install miniupnpc')
endif
osType=build_machine.system()
if osType=='linux'
meson.add_install_script('install.sh')
executable('piso','main.cc',
dependencies :[boost,wxwidgets,miniupnpc],
c_args : extra_args,
install : false,
install_dir : '/opt/piso')
endif
if osType=='windows'
compiler = meson.get_compiler('cpp')
ws2_32 = compiler.find_library('ws2_32', required: true)
wsock32 = compiler.find_library('wsock32', required: true)
extra_args= []
src = ['main.cc']
run_command('windres.exe', 'winres.rc' ,'winres.o', check: true)
executable('piso',src,objects : ['winres.o'],
cpp_args : extra_args,
dependencies :[boost,wxwidgets,miniupnpc,ws2_32,wsock32])
endif