cmake builds with quiche/quic support#9833
Conversation
30bd92f to
9f405b5
Compare
|
[approve ci] |
| set(QUIC_LIBRARIES ${QUICHE_LIBRARY} http3 quic) | ||
| set(QUIC_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/iocore/net/quic) | ||
| set(TS_HAS_QUICHE 1) | ||
| set(TS_USE_QUIC 1) |
There was a problem hiding this comment.
TS_USE_QUIC becomes 1 if the both Quiche and BoringSSL are available.
enable_quic=no
TS_CHECK_QUICHE
if test "${has_quiche}" = "1"; then
if test "$openssl_is_boringssl" = "1" ; then
enable_quic=yes
else
AC_MSG_ERROR([Use of BoringSSL is required if Quiche is used.])
fi
fi
| CHECK_INCLUDE_FILE(stdlib.h HAVE_STDLIB_H) | ||
| CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) |
There was a problem hiding this comment.
| CHECK_INCLUDE_FILE(stdlib.h HAVE_STDLIB_H) | |
| CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) | |
| check_include_file(stdint.h HAVE_STDINT_H) | |
| check_include_file(stdlib.h HAVE_STDLIB_H) |
| find_path(QUICHE_INCLUDE_DIR NAMES quiche.h HINTS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES include) | ||
| find_library(QUICHE_LIBRARY NAMES quiche HINTS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES lib) |
There was a problem hiding this comment.
| find_path(QUICHE_INCLUDE_DIR NAMES quiche.h HINTS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES include) | |
| find_library(QUICHE_LIBRARY NAMES quiche HINTS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES lib) | |
| find_path(QUICHE_INCLUDE_DIR NAMES quiche.h PATHS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES include) | |
| find_library(QUICHE_LIBRARY NAMES quiche PATHS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES lib) |
Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
(https://cmake.org/cmake/help/latest/command/find_library.html)
There was a problem hiding this comment.
You don't need PATH_SUFFIXES here at all. lib/ and include/ are already default search paths.
| find_path(QUICHE_INCLUDE_DIR NAMES quiche.h HINTS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES include) | ||
| find_library(QUICHE_LIBRARY NAMES quiche HINTS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES lib) | ||
|
|
||
| INCLUDE(FindPackageHandleStandardArgs) |
There was a problem hiding this comment.
| INCLUDE(FindPackageHandleStandardArgs) | |
| include(FindPackageHandleStandardArgs) |
| ${CMAKE_SOURCE_DIR}/iocore/net | ||
| ${CMAKE_SOURCE_DIR}/iocore/net/quic | ||
| ${CMAKE_SOURCE_DIR}/iocore/eventsystem |
There was a problem hiding this comment.
| ${CMAKE_SOURCE_DIR}/iocore/net | |
| ${CMAKE_SOURCE_DIR}/iocore/net/quic | |
| ${CMAKE_SOURCE_DIR}/iocore/eventsystem | |
| "${CMAKE_SOURCE_DIR}/iocore/net" | |
| "${CMAKE_SOURCE_DIR}/iocore/net/quic" | |
| "${CMAKE_SOURCE_DIR}/iocore/eventsystem" |
| ${CMAKE_SOURCE_DIR}/iocore/net | ||
| ${CMAKE_SOURCE_DIR}/iocore/net/quic | ||
| ${CMAKE_SOURCE_DIR}/iocore/eventsystem | ||
| ${CMAKE_SOURCE_DIR}/mgmt |
There was a problem hiding this comment.
| ${CMAKE_SOURCE_DIR}/iocore/net | |
| ${CMAKE_SOURCE_DIR}/iocore/net/quic | |
| ${CMAKE_SOURCE_DIR}/iocore/eventsystem | |
| ${CMAKE_SOURCE_DIR}/mgmt | |
| "${CMAKE_SOURCE_DIR}/iocore/net" | |
| "${CMAKE_SOURCE_DIR}/iocore/net/quic" | |
| "${CMAKE_SOURCE_DIR}/iocore/eventsystem" | |
| "${CMAKE_SOURCE_DIR}/mgmt" |
| set(QUICHE_LIBRARY_DIR ${QUICHE_INSTALL_DIR}/lib) | ||
| set(QUIC_LIBRARY_DIRS ${QUICHE_LIBRARY_DIR}) | ||
| set(QUIC_LIBRARIES ${QUICHE_LIBRARY} http3 quic) | ||
| set(QUIC_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/iocore/net/quic) |
There was a problem hiding this comment.
| set(QUICHE_LIBRARY_DIR ${QUICHE_INSTALL_DIR}/lib) | |
| set(QUIC_LIBRARY_DIRS ${QUICHE_LIBRARY_DIR}) | |
| set(QUIC_LIBRARIES ${QUICHE_LIBRARY} http3 quic) | |
| set(QUIC_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/iocore/net/quic) | |
| set(QUICHE_LIBRARY_DIR "${QUICHE_INSTALL_DIR}/lib") | |
| set(QUIC_LIBRARY_DIRS "${QUICHE_LIBRARY_DIR}") | |
| set(QUIC_LIBRARIES "${QUICHE_LIBRARY}" http3 quic) | |
| set(QUIC_INCLUDE_DIRS "${QUICHE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/iocore/net/quic") |
|
Indentation seems very inconsistent. I think we're using 4-space indents in all the CMake stuff - CMake itself uses 2-space indents, which I like, but it might be good to have a unified style. |
| find_library(QUICHE_LIBRARY NAMES quiche HINTS ${QUICHE_INSTALL_DIR} PATH_SUFFIXES lib) | ||
|
|
||
| INCLUDE(FindPackageHandleStandardArgs) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(QUICHE DEFAULT_MSG QUICHE_LIBRARY QUICHE_INCLUDE_DIR) |
There was a problem hiding this comment.
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(QUICHE DEFAULT_MSG QUICHE_LIBRARY QUICHE_INCLUDE_DIR) | |
| find_package_handle_standard_args(QUICHE DEFAULT_MSG QUICHE_LIBRARY QUICHE_INCLUDE_DIR) |
|
#9892 superseded this PR |
No description provided.