hiro: Don't depend on gtksourceview when building bsnes.

Fixes https://github.com/bsnes-emu/bsnes/issues/137
This commit is contained in:
orbea 2021-01-08 07:48:51 -08:00
parent be0ee7652c
commit ab9cd80db7
3 changed files with 31 additions and 9 deletions

View File

@ -1,6 +1,7 @@
target := bsnes
binary := application
build := performance
sourceview := false
openmp := true
local := true
flags += -I. -I..
@ -12,6 +13,11 @@ ifeq ($(profile),true)
options += -pg
endif
# disable gtksourceview
ifeq ($(sourceview),false)
flags += -DHIRO_NO_SOURCEVIEW
endif
# binaries built with this flag are faster, but are not portable to multiple machines.
ifeq ($(local),true)
flags += -march=native

View File

@ -9,13 +9,21 @@ ifeq ($(platform),windows)
endif
ifeq ($(hiro),gtk2)
hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0 gtksourceview-2.0)
hiro.options = $(shell pkg-config --libs gtk+-2.0 gtksourceview-2.0)
hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0)
hiro.options = $(shell pkg-config --libs gtk+-2.0)
ifneq ($(sourceview),false)
hiro.flags += $(shell pkg-config --cflags gtksourceview-2.0)
hiro.options += $(shell pkg-config --libs gtksourceview-2.0)
endif
endif
ifeq ($(hiro),gtk3)
hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0 gtksourceview-3.0) -Wno-deprecated-declarations
hiro.options = $(shell pkg-config --libs gtk+-3.0 gtksourceview-3.0)
hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0) -Wno-deprecated-declarations
hiro.options = $(shell pkg-config --libs gtk+-3.0)
ifneq ($(sourceview),false)
hiro.flags += $(shell pkg-config --cflags gtksourceview-3.0)
hiro.options += $(shell pkg-config --libs gtksourceview-3.0)
endif
endif
endif
@ -36,13 +44,21 @@ ifneq ($(filter $(platform),linux bsd),)
endif
ifeq ($(hiro),gtk2)
hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0 gtksourceview-2.0)
hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-2.0 gtksourceview-2.0)
hiro.flags = $(flags.cpp) -DHIRO_GTK=2 $(shell pkg-config --cflags gtk+-2.0)
hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-2.0)
ifneq ($(sourceview),false)
hiro.flags += $(shell pkg-config --cflags gtksourceview-2.0)
hiro.options += $(shell pkg-config --libs gtksourceview-2.0)
endif
endif
ifeq ($(hiro),gtk3)
hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0 gtksourceview-3.0) -Wno-deprecated-declarations
hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-3.0 gtksourceview-3.0)
hiro.flags = $(flags.cpp) -DHIRO_GTK=3 $(shell pkg-config --cflags gtk+-3.0) -Wno-deprecated-declarations
hiro.options = -L/usr/local/lib -lX11 $(shell pkg-config --libs gtk+-3.0)
ifneq ($(sourceview),false)
hiro.flags += $(shell pkg-config --cflags gtksourceview-3.0)
hiro.options += $(shell pkg-config --libs gtksourceview-3.0)
endif
endif
ifeq ($(hiro),qt4)

View File

@ -77,7 +77,7 @@
//platform-specific exclusions
#if defined(HIRO_WINDOWS) || defined(HIRO_COCOA) || defined(HIRO_QT)
#if defined(HIRO_WINDOWS) || defined(HIRO_COCOA) || defined(HIRO_QT) || defined(HIRO_NO_SOURCEVIEW)
#undef Hiro_ComboEdit
#undef Hiro_Console
#undef Hiro_IconView