diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-13 21:41:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-13 21:41:55 +0100 |
commit | e277ff4d7f95cb17eab4ae7a0fff94b1e5b3472c (patch) | |
tree | e3cf058bb67247dc93ed94c3ab8ebff6c7425c9a /src | |
parent | 0c1029be9828cf3a6876efc9e2b1d315b7754d77 (diff) | |
parent | fb529a01bf1fe7cd577069e03007c693fba22392 (diff) | |
download | libgit2-e277ff4d7f95cb17eab4ae7a0fff94b1e5b3472c.tar.gz |
Merge pull request #5108 from libgit2/ethomson/urlparse_empty_port
Handle URLs with a colon after host but no port
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 647bb097a..5a0cf347c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -340,12 +340,17 @@ ELSE() ENDIF() # Optional external dependency: http-parser -FIND_PACKAGE(HTTP_Parser) -IF (USE_EXT_HTTP_PARSER AND HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2) - LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${HTTP_PARSER_INCLUDE_DIRS}) - LIST(APPEND LIBGIT2_LIBS ${HTTP_PARSER_LIBRARIES}) - LIST(APPEND LIBGIT2_PC_LIBS "-lhttp_parser") - ADD_FEATURE_INFO(http-parser ON "http-parser support") +IF(USE_HTTP_PARSER STREQUAL "system") + FIND_PACKAGE(HTTP_Parser) + + IF (HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2) + LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${HTTP_PARSER_INCLUDE_DIRS}) + LIST(APPEND LIBGIT2_LIBS ${HTTP_PARSER_LIBRARIES}) + LIST(APPEND LIBGIT2_PC_LIBS "-lhttp_parser") + ADD_FEATURE_INFO(http-parser ON "http-parser support (system)") + ELSE() + MESSAGE(FATAL_ERROR "http-parser support was requested but not found") + ENDIF() ELSE() MESSAGE(STATUS "http-parser version 2 was not found or disabled; using bundled 3rd-party sources.") ADD_SUBDIRECTORY("${libgit2_SOURCE_DIR}/deps/http-parser" "${libgit2_BINARY_DIR}/deps/http-parser") |