Better support for compiling with system libraries (#1447)

This commit is contained in:
pajlada
2019-12-29 12:47:15 +01:00
committed by GitHub
parent 443aba3f9c
commit 2cb2f679c2
5 changed files with 70 additions and 4 deletions
+16 -2
View File
@@ -1,4 +1,18 @@
# fmt
SOURCES += $$PWD/fmt/fmt/format.cpp
# Chatterino2 is tested with FMT 4.0
# Exposed build flags:
# - FMT_PREFIX ($$PWD by default)
# - FMT_SYSTEM (1 = true) (Linux only, uses pkg-config)
INCLUDEPATH += $$PWD/fmt/
!defined(FMT_PREFIX) {
FMT_PREFIX = $$PWD
}
linux:equals(FMT_SYSTEM, "1") {
message("Building with system FMT")
PKGCONFIG += fmt
} else {
SOURCES += $$FMT_PREFIX/fmt/fmt/format.cpp
INCLUDEPATH += $$PWD/fmt/
}