Skip to content

Instantly share code, notes, and snippets.

@AndreVallestero
Created August 30, 2019 14:19
Show Gist options
  • Save AndreVallestero/9dd32f54c272e9d2968df8311fd23c47 to your computer and use it in GitHub Desktop.
Save AndreVallestero/9dd32f54c272e9d2968df8311fd23c47 to your computer and use it in GitHub Desktop.
Sample meson build file for SDL2 on windows
#clang++ main.cpp -I/usr/include -L/usr/lib64 -lSDL2main -lSDL2 -Xlinker /subsystem:windows
project('hello-triangle', 'cpp')
compiler = meson.get_compiler('cpp')
incdirs = ['C:\usr\include']
libdirs = ['C:\usr\lib64']
libs = ['SDL2', 'SDL2main']
sources = ['main.cpp']
deps = []
foreach libname : libs
deps += [compiler.find_library(libname, dirs : libdirs)]
endforeach
executable('hello-triangle', sources,
include_directories : include_directories(incdirs),
dependencies : deps,
link_args : ['-Xlinker', '/subsystem:windows'],
gui_app : true,
install : true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment