mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-12 13:12:07 +00:00
Don't use host pkg-config when cross-compiling
Fix cross-compiling using mingw-w64 on Ubuntu 18.04. pkg-config --cflags libcurl is now pulling in a Linux include directory which breaks compiling.
This commit is contained in:
parent
0cf10d2b77
commit
302f12b8f6
1 changed files with 12 additions and 1 deletions
13
Makefile
13
Makefile
|
@ -285,7 +285,17 @@ bin_path=$(shell which $(1) 2> /dev/null)
|
|||
# set PKG_CONFIG_PATH or PKG_CONFIG to influence this, e.g.
|
||||
# PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig or
|
||||
# PKG_CONFIG=arm-linux-gnueabihf-pkg-config
|
||||
PKG_CONFIG ?= pkg-config
|
||||
ifeq ($(CROSS_COMPILING),0)
|
||||
PKG_CONFIG ?= pkg-config
|
||||
else
|
||||
ifneq ($(PKG_CONFIG_PATH),)
|
||||
PKG_CONFIG ?= pkg-config
|
||||
else
|
||||
# Don't use host pkg-config when cross-compiling.
|
||||
# (unknown-pkg-config is meant to be a non-existant command.)
|
||||
PKG_CONFIG ?= unknown-pkg-config
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(call bin_path, $(PKG_CONFIG)),)
|
||||
CURL_CFLAGS ?= $(shell $(PKG_CONFIG) --silence-errors --cflags libcurl)
|
||||
|
@ -1360,6 +1370,7 @@ targets: makedirs
|
|||
@echo " COMPILE_PLATFORM: $(COMPILE_PLATFORM)"
|
||||
@echo " COMPILE_ARCH: $(COMPILE_ARCH)"
|
||||
@echo " HAVE_VM_COMPILED: $(HAVE_VM_COMPILED)"
|
||||
@echo " PKG_CONFIG: $(PKG_CONFIG)"
|
||||
@echo " CC: $(CC)"
|
||||
ifeq ($(PLATFORM),mingw32)
|
||||
@echo " WINDRES: $(WINDRES)"
|
||||
|
|
Loading…
Reference in a new issue