Created
August 30, 2019 14:19
-
-
Save AndreVallestero/9dd32f54c272e9d2968df8311fd23c47 to your computer and use it in GitHub Desktop.
Sample meson build file for SDL2 on windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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