Use flags required for using GTK in widgets sample
As we use GTK directly in this sample, we need to use the appropriate compiler and link flags, so add them depending on the port in the makefile.
This commit is contained in:
parent
2e22666db8
commit
0ab31edc17
2 changed files with 16 additions and 0 deletions
|
|
@ -228,6 +228,14 @@ WIDGETS_OBJECTS += widgets_native_wrapper.o
|
|||
|
||||
widgets: widgets_native_wrapper.o
|
||||
endif
|
||||
ifeq ($(WX_PORT),gtk2)
|
||||
widgets_native.o: CXXFLAGS=$(shell pkg-config --cflags gtk+-2.0)
|
||||
widgets: LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
|
||||
endif
|
||||
ifeq ($(WX_PORT),gtk3)
|
||||
widgets_native.o: CXXFLAGS=$(shell pkg-config --cflags gtk+-3.0)
|
||||
widgets: LDFLAGS=$(shell pkg-config --libs gtk+-3.0)
|
||||
endif
|
||||
|
||||
# Dependencies tracking:
|
||||
-include ./*.d
|
||||
|
|
|
|||
|
|
@ -31,6 +31,14 @@ ifeq ($(WX_PORT),osx_cocoa)
|
|||
WIDGETS_OBJECTS += widgets_native_wrapper.o
|
||||
|
||||
widgets: widgets_native_wrapper.o
|
||||
endif
|
||||
ifeq ($(WX_PORT),gtk2)
|
||||
widgets_native.o: CXXFLAGS=$(shell pkg-config --cflags gtk+-2.0)
|
||||
widgets: LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
|
||||
endif
|
||||
ifeq ($(WX_PORT),gtk3)
|
||||
widgets_native.o: CXXFLAGS=$(shell pkg-config --cflags gtk+-3.0)
|
||||
widgets: LDFLAGS=$(shell pkg-config --libs gtk+-3.0)
|
||||
endif
|
||||
</fragment>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue