mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Better support for compiling with system libraries (#1447)
This commit is contained in:
parent
443aba3f9c
commit
2cb2f679c2
|
@ -1,3 +1,16 @@
|
|||
# Exposed build flags:
|
||||
# from lib/fmt.pri
|
||||
# - FMT_PREFIX ($$PWD by default)
|
||||
# - FMT_SYSTEM (1 = true) (Linux only, uses pkg-config)
|
||||
# from lib/websocketpp.pri
|
||||
# - WEBSOCKETPP_PREFIX ($$PWD by default)
|
||||
# - WEBSOCKETPP_SYSTEM (1 = true) (unix only)
|
||||
# from lib/rapidjson.pri
|
||||
# - RAPIDJSON_PREFIX ($$PWD by default)
|
||||
# - RAPIDJSON_SYSTEM (1 = true) (Linux only, uses pkg-config)
|
||||
# from lib/boost.pri
|
||||
# - BOOST_DIRECTORY (C:\local\boost\ by default) (Windows only)
|
||||
|
||||
QT += widgets core gui network multimedia svg concurrent
|
||||
CONFIG += communi
|
||||
COMMUNI += core model util
|
||||
|
@ -31,6 +44,9 @@ win32-msvc* {
|
|||
linux {
|
||||
LIBS += -lrt
|
||||
QMAKE_LFLAGS += -lrt
|
||||
|
||||
# Enable linking libraries using PKGCONFIG += libraryname
|
||||
CONFIG += link_pkgconfig
|
||||
}
|
||||
|
||||
macx {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# boost
|
||||
# Exposed build flags:
|
||||
# - BOOST_DIRECTORY (C:\local\boost\ by default) (Windows only)
|
||||
|
||||
pajlada {
|
||||
BOOST_DIRECTORY = C:\dev\projects\boost_1_66_0\
|
||||
}
|
||||
|
|
18
lib/fmt.pri
18
lib/fmt.pri
|
@ -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/
|
||||
}
|
||||
|
|
|
@ -1,2 +1,15 @@
|
|||
# rapidjson
|
||||
INCLUDEPATH += $$PWD/rapidjson/include/
|
||||
# Chatterino2 is tested with RapidJSON v1.1.0
|
||||
# - RAPIDJSON_PREFIX ($$PWD by default)
|
||||
# - RAPIDJSON_SYSTEM (1 = true) (Linux only, uses pkg-config)
|
||||
|
||||
!defined(RAPIDJSON_PREFIX) {
|
||||
RAPIDJSON_PREFIX = $$PWD
|
||||
}
|
||||
|
||||
linux:equals(RAPIDJSON_SYSTEM, "1") {
|
||||
message("Building with system RapidJSON")
|
||||
PKGCONFIG += RapidJSON
|
||||
} else {
|
||||
INCLUDEPATH += $$RAPIDJSON_PREFIX/rapidjson/include/
|
||||
}
|
||||
|
|
|
@ -1 +1,20 @@
|
|||
INCLUDEPATH += $$PWD/../lib/websocketpp
|
||||
# websocketpp
|
||||
# Chatterino2 is tested with websocketpp 0.8.1
|
||||
# Exposed build flags:
|
||||
# - WEBSOCKETPP_PREFIX ($$PWD by default)
|
||||
# - WEBSOCKETPP_SYSTEM (1 = true) (unix only)
|
||||
|
||||
!defined(WEBSOCKETPP_PREFIX) {
|
||||
WEBSOCKETPP_PREFIX = $$PWD
|
||||
}
|
||||
|
||||
unix {
|
||||
equals(WEBSOCKETPP_SYSTEM, "1") {
|
||||
message("Building with system websocketpp")
|
||||
} else {
|
||||
message("Building with websocketpp submodule (Prefix: $$WEBSOCKETPP_PREFIX)")
|
||||
INCLUDEPATH += $$WEBSOCKETPP_PREFIX/websocketpp/
|
||||
}
|
||||
} else {
|
||||
INCLUDEPATH += $$WEBSOCKETPP_PREFIX/websocketpp
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue