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:
parent
76e3b7dff8
commit
aa3d560b05
@ -6,10 +6,21 @@ pub const used_import = 1
|
|||||||
#flag -I @VEXEROOT/thirdparty/sokol/util
|
#flag -I @VEXEROOT/thirdparty/sokol/util
|
||||||
#flag freebsd -I /usr/local/include
|
#flag freebsd -I /usr/local/include
|
||||||
#flag darwin -fobjc-arc
|
#flag darwin -fobjc-arc
|
||||||
|
|
||||||
#flag linux -lX11 -lGL -lXcursor -lXi -lpthread
|
#flag linux -lX11 -lGL -lXcursor -lXi -lpthread
|
||||||
#flag freebsd -L/usr/local/lib -lX11 -lGL -lXcursor -lXi
|
#flag freebsd -L/usr/local/lib -lX11 -lGL -lXcursor -lXi
|
||||||
#flag openbsd -L/usr/X11R6/lib -lX11 -lGL -lXcursor -lXi
|
#flag openbsd -L/usr/X11R6/lib -lX11 -lGL -lXcursor -lXi
|
||||||
#flag windows -lgdi32
|
#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
|
// METAL
|
||||||
$if macos {
|
$if macos {
|
||||||
$if darwin_sokol_glcore33 ? {
|
$if darwin_sokol_glcore33 ? {
|
||||||
|
Loading…
Reference in New Issue
Block a user