mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Added ability to build with packaged version of cpp-httplib.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
parent
2f23a7d86f
commit
c432cf4909
1 changed files with 10 additions and 2 deletions
|
@ -62,6 +62,7 @@ option(USE_BUNDLED_COEURL "Use a bundled version of the Curl wrapper"
|
||||||
option(USE_BUNDLED_LIBEVENT "Use the bundled version of libevent." ${HUNTER_ENABLED})
|
option(USE_BUNDLED_LIBEVENT "Use the bundled version of libevent." ${HUNTER_ENABLED})
|
||||||
option(USE_BUNDLED_LIBCURL "Use the bundled version of libcurl." ${HUNTER_ENABLED})
|
option(USE_BUNDLED_LIBCURL "Use the bundled version of libcurl." ${HUNTER_ENABLED})
|
||||||
option(USE_BUNDLED_RE2 "Use the bundled version of re2." ${HUNTER_ENABLED})
|
option(USE_BUNDLED_RE2 "Use the bundled version of re2." ${HUNTER_ENABLED})
|
||||||
|
option(USE_BUNDLED_CPPHTTPLIB "Use the bundled version of cpp-httplib." ON)
|
||||||
|
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
set(VOIP_DEFAULT ON)
|
set(VOIP_DEFAULT ON)
|
||||||
|
@ -697,14 +698,21 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12)
|
target_include_directories(nheko PRIVATE src includes third_party/blurhash)
|
||||||
set(THIRD_PARTY_SRC_FILES
|
set(THIRD_PARTY_SRC_FILES
|
||||||
third_party/blurhash/blurhash.cpp
|
third_party/blurhash/blurhash.cpp
|
||||||
third_party/blurhash/blurhash.hpp
|
third_party/blurhash/blurhash.hpp
|
||||||
third_party/cpp-httplib-0.5.12/httplib.h
|
|
||||||
)
|
)
|
||||||
target_sources(nheko PRIVATE ${THIRD_PARTY_SRC_FILES})
|
target_sources(nheko PRIVATE ${THIRD_PARTY_SRC_FILES})
|
||||||
|
|
||||||
|
if (USE_BUNDLED_CPPHTTPLIB)
|
||||||
|
target_include_directories(nheko PRIVATE third_party/cpp-httplib-0.5.12)
|
||||||
|
target_sources(nheko PRIVATE third_party/cpp-httplib-0.5.12/httplib.h)
|
||||||
|
else()
|
||||||
|
find_package(httplib REQUIRED)
|
||||||
|
target_link_libraries(nheko PRIVATE httplib::httplib)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Fixup bundled keychain include dirs
|
# Fixup bundled keychain include dirs
|
||||||
if (USE_BUNDLED_QTKEYCHAIN)
|
if (USE_BUNDLED_QTKEYCHAIN)
|
||||||
target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})
|
target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})
|
||||||
|
|
Loading…
Reference in a new issue