mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-06 07:00:16 +08:00
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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user