mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: enable FreeBSD's cflags for freetype & glfw
This commit is contained in:
parent
366c50674c
commit
4b03abdaff
@ -25,6 +25,7 @@ fn (v &V) get_os_cflags() []CFlag {
|
||||
if flag.os == ''
|
||||
|| (flag.os == 'linux' && v.os == .linux)
|
||||
|| (flag.os == 'darwin' && v.os == .mac)
|
||||
|| (flag.os == 'freebsd' && v.os == .freebsd)
|
||||
|| (flag.os == 'windows' && (v.os == .windows || v.os == .msvc)) {
|
||||
flags << flag
|
||||
}
|
||||
@ -81,7 +82,7 @@ fn (table mut Table) parse_cflag(cflag string, mod string) {
|
||||
}
|
||||
mut fos := ''
|
||||
mut name := ''
|
||||
if flag.starts_with('linux') || flag.starts_with('darwin') || flag.starts_with('windows') {
|
||||
if flag.starts_with('linux') || flag.starts_with('darwin') || flag.starts_with('freebsd') || flag.starts_with('windows') {
|
||||
pos := flag.index(' ')
|
||||
fos = flag.left(pos).trim_space()
|
||||
flag = flag.right(pos).trim_space()
|
||||
|
@ -17,6 +17,8 @@ import (
|
||||
|
||||
#flag darwin -I/usr/local/include/freetype2
|
||||
#flag darwin -I/opt/local/include/freetype2
|
||||
#flag freebsd -I/usr/local/include/freetype2
|
||||
#flag freebsd -Wl,-L/usr/local/lib
|
||||
#flag -lfreetype
|
||||
|
||||
//#flag -I @VROOT/thirdparty/freetype
|
||||
|
@ -18,6 +18,8 @@ import gl
|
||||
#flag darwin -L/opt/local/lib
|
||||
|
||||
#flag darwin -lglfw
|
||||
#flag freebsd -I/usr/local/include
|
||||
#flag freebsd -Wl,-L/usr/local/lib,-lglfw
|
||||
#flag linux -lglfw
|
||||
#flag windows -lglfw3
|
||||
#include <GLFW/glfw3.h>
|
||||
|
Loading…
Reference in New Issue
Block a user