Skip to content

Commit b399ec9

Browse files
committed
Makefile: detect sfml-all pkg-config for SFML 3.1+
SFML 3.1 renamed the pkg-config file from sfml to sfml-all. When sfml-all is found, use --static --libs to resolve all transitive dependencies (harfbuzz, mbedtls, libssh2, etc.) rather than relying on the plain --libs TEMP_LIBS path which misses them.
1 parent 0d5ff5a commit b399ec9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ ifeq ($(WINDOWS_STATIC),1)
251251
CPPFLAGS += -DSFML_STATIC $(shell $(PKG_CONFIG) --static --cflags $(SFML_PC))
252252
FE_WINDOWS_COMPILE=1
253253

254+
else ifeq ($(shell $(PKG_CONFIG) --exists sfml-all && echo "1" || echo "0"), 1)
255+
LIBS += $(shell $(PKG_CONFIG) --static --libs sfml-all)
256+
CPPFLAGS += $(shell $(PKG_CONFIG) --cflags sfml-all)
254257
else
255258
TEMP_LIBS += sfml-graphics sfml-window sfml-system
256259
endif
@@ -458,7 +461,7 @@ endif
458461

459462
CPPFLAGS += -D__STDC_CONSTANT_MACROS
460463

461-
LIBS := $(LIBS) $(shell $(PKG_CONFIG) --libs $(TEMP_LIBS))
464+
LIBS := $(LIBS) $(shell $(PKG_CONFIG) --static --libs $(TEMP_LIBS))
462465
CPPFLAGS := $(CPPFLAGS) $(shell $(PKG_CONFIG) --cflags $(TEMP_LIBS))
463466

464467
EXE = $(EXE_BASE)$(EXE_EXT)

0 commit comments

Comments
 (0)