diff --git a/cmake/SelectHTTPParser.cmake b/cmake/SelectHTTPParser.cmake index 111170cb2..4fc1f6968 100644 --- a/cmake/SelectHTTPParser.cmake +++ b/cmake/SelectHTTPParser.cmake @@ -24,9 +24,9 @@ elseif(USE_HTTP_PARSER STREQUAL "llhttp") message(FATAL_ERROR "llhttp support was requested but not found") endif() else() - add_subdirectory("${PROJECT_SOURCE_DIR}/deps/http-parser" "${PROJECT_BINARY_DIR}/deps/http-parser") - list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/http-parser") - list(APPEND LIBGIT2_DEPENDENCY_OBJECTS "$") + add_subdirectory("${PROJECT_SOURCE_DIR}/deps/llhttp" "${PROJECT_BINARY_DIR}/deps/llhttp") + list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/llhttp") + list(APPEND LIBGIT2_DEPENDENCY_OBJECTS "$") set(GIT_HTTPPARSER_BUILTIN 1) add_feature_info(http-parser ON "using bundled parser") endif() diff --git a/deps/llhttp/CMakeLists.txt b/deps/llhttp/CMakeLists.txt index 89daa87c8..6965335ab 100644 --- a/deps/llhttp/CMakeLists.txt +++ b/deps/llhttp/CMakeLists.txt @@ -1,7 +1,7 @@ -file(GLOB SRC_HTTP "*.c" "*.h") -list(SORT SRC_HTTP) +file(GLOB SRC_LLHTTP "*.c" "*.h") +list(SORT SRC_LLHTTP) -add_library(llhttp OBJECT ${SRC_HTTP}) +add_library(llhttp OBJECT ${SRC_LLHTTP}) if(NOT MSVC) set_source_files_properties(api.c http.c llhttp.c PROPERTIES COMPILE_FLAGS "-Wno-unused-parameter -Wno-missing-declarations") diff --git a/src/libgit2/transports/httpparser.c b/src/libgit2/transports/httpparser.c index abd8f0244..50ba6d2e0 100644 --- a/src/libgit2/transports/httpparser.c +++ b/src/libgit2/transports/httpparser.c @@ -9,7 +9,7 @@ #include -#if defined(GIT_HTTPPARSER_HTTPPARSER) || defined(GIT_HTTPPARSER_BUILTIN) +#if defined(GIT_HTTPPARSER_HTTPPARSER) #include "http_parser.h" @@ -82,7 +82,7 @@ size_t git_http_parser_execute( return http_parser_execute(&parser->parser, &settings_proxy, data, len); } -#elif defined(GIT_HTTPPARSER_LLHTTP) +#elif defined(GIT_HTTPPARSER_LLHTTP) || defined(GIT_HTTPPARSER_BUILTIN) # include diff --git a/src/libgit2/transports/httpparser.h b/src/libgit2/transports/httpparser.h index 616be587e..1fe0dcf64 100644 --- a/src/libgit2/transports/httpparser.h +++ b/src/libgit2/transports/httpparser.h @@ -10,7 +10,7 @@ #include "git2_util.h" -#if defined(GIT_HTTPPARSER_HTTPPARSER) || defined(GIT_HTTPPARSER_BUILTIN) +#if defined(GIT_HTTPPARSER_HTTPPARSER) # include @@ -60,7 +60,7 @@ size_t git_http_parser_execute( # define git_http_parser_errno(parser) parser->parser.http_errno # define git_http_parser_errmsg(parser, errno) http_errno_description(errno) -#elif defined(GIT_HTTPPARSER_LLHTTP) +#elif defined(GIT_HTTPPARSER_LLHTTP) || defined(GIT_HTTPPARSER_BUILTIN) # include