@@ -113,6 +113,8 @@ endif()
113113
114114include (SelectHTTPSBackend)
115115include (SelectHashes)
116+ include (SelectHTTPParser)
117+
116118target_sources (git2internal PRIVATE ${SRC_SHA1} )
117119
118120# Specify regular expression implementation
@@ -167,26 +169,6 @@ else()
167169 message (FATAL_ERROR "The REGEX_BACKEND option provided is not supported" )
168170endif ()
169171
170- # Optional external dependency: http-parser
171- if (USE_HTTP_PARSER STREQUAL "system" )
172- find_package (HTTPParser)
173-
174- if (HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2)
175- list (APPEND LIBGIT2_SYSTEM_INCLUDES ${HTTP_PARSER_INCLUDE_DIRS} )
176- list (APPEND LIBGIT2_LIBS ${HTTP_PARSER_LIBRARIES} )
177- list (APPEND LIBGIT2_PC_LIBS "-lhttp_parser" )
178- add_feature_info(http-parser ON "http-parser support (system)" )
179- else ()
180- message (FATAL_ERROR "http-parser support was requested but not found" )
181- endif ()
182- else ()
183- message (STATUS "http-parser version 2 was not found or disabled; using bundled 3rd-party sources." )
184- add_subdirectory ("${libgit2_SOURCE_DIR} /deps/http-parser" "${libgit2_BINARY_DIR} /deps/http-parser" )
185- list (APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR} /deps/http-parser" )
186- list (APPEND LIBGIT2_OBJECTS "$<TARGET_OBJECTS:http-parser>" )
187- add_feature_info(http-parser ON "http-parser support (bundled)" )
188- endif ()
189-
190172# Optional external dependency: zlib
191173SanitizeBool(USE_BUNDLED_ZLIB)
192174if (USE_BUNDLED_ZLIB STREQUAL ON )
0 commit comments