1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sokol: fix v -cc gcc ~/.vmodules/sdl/examples/sdl_opengl_and_sokol/ on Linux (add missing -lm for gcc/clang)

This commit is contained in:
Delyan Angelov 2023-07-28 02:27:43 +03:00
parent 76e3b7dff8
commit aa3d560b05
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -6,10 +6,21 @@ pub const used_import = 1
#flag -I @VEXEROOT/thirdparty/sokol/util
#flag freebsd -I /usr/local/include
#flag darwin -fobjc-arc
#flag linux -lX11 -lGL -lXcursor -lXi -lpthread
#flag freebsd -L/usr/local/lib -lX11 -lGL -lXcursor -lXi
#flag openbsd -L/usr/X11R6/lib -lX11 -lGL -lXcursor -lXi
#flag windows -lgdi32
// Note that -lm is needed *only* for sokol_gl.h's usage of sqrtf(),
// but without -lm, this fails:
// `v -cc gcc ~/.vmodules/sdl/examples/sdl_opengl_and_sokol/`
// With tcc, this succeeds with or without -lm:
// `v ~/.vmodules/sdl/examples/sdl_opengl_and_sokol/`
$if !tinyc {
#flag linux -lm
}
// METAL
$if macos {
$if darwin_sokol_glcore33 ? {