summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2023-02-15 20:15:50 +0100
committerGitHub <noreply@github.com>2023-02-15 20:15:50 +0100
commit59b5df479eda3e3fb37feefccfd9c5ed7d699104 (patch)
tree472d38c816c5ccee5fa2389fd270aaeafc9827a9
parentTranslated using Weblate (Estonian) (diff)
parentAdded ability to build with packaged version of cpp-httplib. (diff)
downloadnheko-59b5df479eda3e3fb37feefccfd9c5ed7d699104.tar.xz
Merge pull request #1371 from xvitaly/httplib
Added ability to build with packaged version of cpp-httplib
-rw-r--r--CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt

index d4724a1c..2aa6faeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -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_LIBCURL "Use the bundled version of libcurl." ${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) set(VOIP_DEFAULT ON) @@ -697,14 +698,21 @@ else() 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 third_party/blurhash/blurhash.cpp third_party/blurhash/blurhash.hpp - third_party/cpp-httplib-0.5.12/httplib.h ) 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 if (USE_BUNDLED_QTKEYCHAIN) target_include_directories(nheko PRIVATE ${qt5keychain_SOURCE_DIR} ${qt5keychain_BINARY_DIR})