2016-02-11 13:46:59 +01:00
# nghttp2 - HTTP/2 C Library
#
# Copyright (c) 2012, 2013, 2014, 2015 Tatsuhiro Tsujikawa
# Copyright (c) 2016 Peter Wu <peter@lekensteyn.nl>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
cmake_minimum_required ( VERSION 3.0 )
# XXX using 1.7.90 instead of 1.8.0-DEV
project ( nghttp2 VERSION 1.7.90 )
2016-02-11 22:11:14 +01:00
# See versioning rule:
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
set ( LT_CURRENT 18 )
set ( LT_REVISION 1 )
set ( LT_AGE 4 )
2016-02-11 13:46:59 +01:00
set ( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" )
include ( Version )
set ( PACKAGE_VERSION "${PROJECT_VERSION}" )
HexVersion ( PACKAGE_VERSION_NUM ${ PROJECT_VERSION_MAJOR } ${ PROJECT_VERSION_MINOR } ${ PROJECT_VERSION_PATCH } )
2016-02-11 22:11:14 +01:00
include ( GNUInstallDirs )
2016-02-11 13:46:59 +01:00
option ( ENABLE_WERROR "Turn on compile time warnings" )
option ( ENABLE_DEBUG "Turn on debug output" )
option ( ENABLE_THREADS "Turn on threading in apps" ON )
option ( ENABLE_APP "Build applications (nghttp, nghttpd, nghttpx and h2load)"
c h e c k )
option ( ENABLE_HPACK_TOOLS "Build HPACK tools" check )
option ( ENABLE_ASIO_LIB "Build C++ libnghttp2_asio library" )
option ( ENABLE_EXAMPLES "Build examples" check )
option ( ENABLE_PYTHON_BINDINGS "Build Python bindings" check )
option ( ENABLE_FAILMALLOC "Build failmalloc test program" ON )
option ( ENABLE_LIB_ONLY "Build libnghttp2 only. This is a short hand for -DENABLE_APP=0 -DENABLE_EXAMPLES=0 -DENABLE_HPACK_TOOLS=0 -DENABLE_PYTHON_BINDINGS=0" )
option ( WITH_LIBXML2 "Use libxml2" check )
option ( WITH_JEMALLOC "Use jemalloc" check )
option ( WITH_SPDYLAY "Use spdylay" check )
option ( WITH_MRUBY "Use mruby" )
option ( WITH_NEVERBLEED "Use neverbleed" )
set ( CYTHON_PATH "" CACHE PATH "Use cython in given path" )
set ( CYTHON "" CACHE FILEPATH "The Cython executable" )
find_package ( PkgConfig 0.20 )
# XXX fail only when "ON" instead of "CHECK"?
if ( ENABLE_PYTHON_BINDINGS )
find_package ( PythonInterp REQUIRED )
endif ( )
# AM_PATH_PYTHON([2.7],, [:])
if ( ENABLE_LIB_ONLY )
set ( ENABLE_APP OFF )
set ( ENABLE_HPACK_TOOLS OFF )
set ( ENABLE_EXAMPLES OFF )
set ( ENABLE_PYTHON_BINDINGS OFF )
endif ( )
if ( ENABLE_PYTHON_BINDINGS )
find_package ( PythonLibs 2.7 REQUIRED )
# XXX find cython
endif ( )
# if [test "x$request_python_bindings" != "xno"]; then
# AX_PYTHON_DEVEL([>= '2.7'])
# fi
#
# if test "x${cython_path}" = "x"; then
# AC_CHECK_PROGS([CYTHON], [cython.py cython])
# else
# CYTHON=${cython_path}
# AC_SUBST([CYTHON])
# fi
#
# If we're running GCC or clang define _U_ to be "__attribute__((unused))"
# so we can use _U_ to flag unused function parameters and not get warnings
# about them. Otherwise, define _U_ to be an empty string so that _U_ used
# to flag an unused function parameters will compile with other compilers.
#
# XXX - similar hints for other compilers?
#
if ( CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang" )
add_definitions (
" - D _ U _ = __attribute__ ( ( unused ) ) "
" - D N G H T T P 2 _ N O R E T U R N = __attribute__ ( ( noreturn ) ) "
)
else ( )
add_definitions ( -D_U_ -DNGHTTP2_NORETURN )
endif ( )
2016-02-11 22:15:46 +01:00
include ( ExtractValidFlags )
foreach ( _cxx1x_flag -std=gnu++11 -std=gnu++0x )
extract_valid_cxx_flags ( _cxx1x_flag_supported ${ _cxx1x_flag } )
if ( _cxx1x_flag_supported )
2016-02-11 13:46:59 +01:00
set ( CXX1XCXXFLAGS ${ _cxx1x_flag } )
break ( )
endif ( )
endforeach ( )
include ( CMakePushCheckState )
include ( CheckCXXSourceCompiles )
cmake_push_check_state ( )
set ( CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} ${CXX1XCXXFLAGS}" )
# Check that std::future is available.
2016-02-11 17:54:30 +01:00
check_cxx_source_compiles ( "
2016-02-11 13:46:59 +01:00
#include <vector>
#include <future>
i n t main ( ) { s t d : : v e c t o r < s t d : : f u t u r e < i n t > > v ; } " H A V E _ S T D _ F U T U R E )
# Check that std::map::emplace is available for g++-4.7.
2016-02-11 17:54:30 +01:00
check_cxx_source_compiles ( "
2016-02-11 13:46:59 +01:00
#include <map>
i n t main ( ) { s t d : : m a p < i n t , i n t > ( ) . emplace ( 1, 2 ) ; } " H A V E _ S T D _ M A P _ E M P L A C E )
cmake_pop_check_state ( )
# Checks for libraries.
#
# # Additional libraries required for tests.
# TESTLDADD=
#
# # Additional libraries required for programs under src directory.
# APPLDFLAGS=
#
# case "$host" in
# *android*)
# android_build=yes
# # android does not need -pthread, but needs followng 3 libs for C++
# APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic -lsupc++"
# ;;
# *)
# PTHREAD_LDFLAGS="-pthread"
# APPLDFLAGS="$APPLDFLAGS $PTHREAD_LDFLAGS"
# ;;
# esac
pkg_check_modules ( ZLIB zlib>=1.2.3 )
2016-02-11 18:19:45 +01:00
if ( ZLIB_FOUND )
set ( HAVE_ZLIB 1 )
else ( )
set ( HAVE_ZLIB 0 )
endif ( )
2016-02-11 13:46:59 +01:00
# # dl: openssl requires libdl when it is statically linked.
# case "${host_os}" in
# *bsd*)
# # dlopen is in libc on *BSD
# ;;
# *)
# save_LIBS=$LIBS
# AC_SEARCH_LIBS([dlopen], [dl], [APPLDFLAGS="-ldl $APPLDFLAGS"], [], [])
# LIBS=$save_LIBS
# ;;
# esac
# XXX put this in FindCUNIT.cmake
pkg_check_modules ( CUNIT cunit>=2.1 )
# # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
# # do this because Debian (Ubuntu) lacks pkg-config file for cunit.
# if test "x${have_cunit}" = "xno"; then
# AC_MSG_WARN([${CUNIT_PKG_ERRORS}])
# AC_CHECK_LIB([cunit], [CU_initialize_registry],
# [have_cunit=yes], [have_cunit=no])
# if test "x${have_cunit}" = "xyes"; then
# CUNIT_LIBS="-lcunit"
# CUNIT_CFLAGS=""
# AC_SUBST([CUNIT_LIBS])
# AC_SUBST([CUNIT_CFLAGS])
# fi
# fi
# if test "x${have_cunit}" = "xyes"; then
# # cunit in Mac OS X requires ncurses. Note that in Mac OS X, test
# # program can be built without -lncurses, but it emits runtime
# # error.
# case "${build}" in
# *-apple-darwin*)
# CUNIT_LIBS="$CUNIT_LIBS -lncurses"
# AC_SUBST([CUNIT_LIBS])
# ;;
# esac
# fi
#
# AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])
2016-02-11 15:49:39 +01:00
# libev (for src)
find_package ( Libev )
2016-02-11 18:19:45 +01:00
if ( Libev_FOUND )
set ( HAVE_LIBEV 1 )
else ( )
set ( HAVE_LIBEV 0 )
endif ( )
2016-02-11 13:46:59 +01:00
# openssl (for src)
pkg_check_modules ( OPENSSL openssl>=1.0.1 )
2016-02-11 18:19:45 +01:00
if ( OPENSSL_FOUND )
set ( HAVE_OPENSSL 1 )
else ( )
set ( HAVE_OPENSSL 0 )
endif ( )
2016-02-11 13:46:59 +01:00
# libevent_openssl (for examples)
# 2.0.8 is required because we use evconnlistener_set_error_cb()
pkg_check_modules ( LIBEVENT_OPENSSL libevent_openssl>=2.0.8 )
2016-02-11 18:19:45 +01:00
if ( LIBEVENT_OPENSSL_FOUND )
set ( HAVE_LIBEVENT_OPENSSL 1 )
else ( )
set ( HAVE_LIBEVENT_OPENSSL 0 )
endif ( )
2016-02-11 13:46:59 +01:00
# jansson (for src/nghttp, src/deflatehd and src/inflatehd)
pkg_check_modules ( JANSSON jansson>=2.5 )
if ( JANSSON_FOUND )
set ( HAVE_JANSSON 1 )
2016-02-11 18:19:45 +01:00
else ( )
set ( HAVE_JANSSON 0 )
2016-02-11 13:46:59 +01:00
endif ( )
# libxml2 (for src/nghttp)
if ( WITH_LIBXML2 )
find_package ( LibXml2 2.7.7 REQUIRED )
set ( HAVE_LIBXML2 1 )
# XXX fail if WITH_LIBXML2=ON
2016-02-11 18:19:45 +01:00
else ( )
set ( HAVE_LIBXML2 0 )
2016-02-11 13:46:59 +01:00
endif ( )
# jemalloc
if ( WITH_JEMALLOC )
2016-02-11 15:49:39 +01:00
pkg_check_modules ( JEMALLOC jemalloc )
if ( NOT JEMALLOC_FOUND )
find_package ( jemalloc REQUIRED )
endif ( )
2016-02-11 18:19:45 +01:00
if ( JEMALLOC_FOUND )
set ( HAVE_JEMALLOC 1 )
else ( )
set ( HAVE_JEMALLOC 0 )
endif ( )
else ( )
set ( HAVE_JEMALLOC 0 )
2016-02-11 13:46:59 +01:00
endif ( )
# spdylay (for src/nghttpx and src/h2load)
if ( WITH_SPDYLAY )
pkg_check_modules ( LIBSPDYLAY libspdylay>=1.3.2 )
if ( LIBSPDYLAY_FOUND )
set ( HAVE_SPDYLAY 1 )
else ( )
2016-02-11 18:19:45 +01:00
set ( HAVE_SPDYLAY 0 )
2016-02-11 13:46:59 +01:00
message ( STATUS "The SPDY support in nghttpx and h2load will be disabled." )
endif ( )
# XXX fail if WITH_SPDYLAY=ON
2016-02-11 18:19:45 +01:00
else ( )
set ( HAVE_SPDYLAY 0 )
2016-02-11 13:46:59 +01:00
endif ( )
2016-02-11 15:49:39 +01:00
if ( ENABLE_ASIO_LIB )
find_package ( Boost 1.54.0 REQUIRED system thread )
endif ( )
# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL and libev
if ( ENABLE_APP AND NOT ( ZLIB_FOUND AND OPENSSL_FOUND AND LIBEV_FOUND ) )
message ( FATAL_ERROR "Applications were requested (ENABLE_APP=1) but dependencies are not met." )
endif ( )
# HPACK tools requires jansson
if ( ENABLE_HPACK_TOOLS AND NOT HAVE_JANSSON )
message ( FATAL_ERROR "HPACK tools were requested (ENABLE_HPACK_TOOLS=1) but dependencies are not met." )
endif ( )
# C++ library libnghttp2_asio
if ( ENABLE_EXAMPLES AND NOT ( OPENSSL_FOUND AND LIBEVENT_OPENSSL_FOUND ) )
message ( FATAL_ERROR "examples were requested (--enable-examples) but dependencies are not met." )
endif ( )
# third-party http-parser only be built when needed
if ( ENABLE_EXAMPLES OR ENABLE_APP OR ENABLE_HPACK_TOOLS OR ENABLE_ASIO_LIB )
set ( ENABLE_THIRD_PARTY 1 )
# mruby (for src/nghttpx)
if ( WITH_MRUBY )
set ( HAVE_MRUBY 1 )
# XXX add -lmruby and -lm libs
2016-02-11 18:19:45 +01:00
else ( )
set ( HAVE_MRUBY 0 )
2016-02-11 15:49:39 +01:00
endif ( )
if ( WITH_NEVERBLEED )
set ( HAVE_NEVERBLEED 1 )
2016-02-11 18:19:45 +01:00
else ( )
set ( HAVE_NEVERBLEED 0 )
2016-02-11 15:49:39 +01:00
endif ( )
2016-02-11 18:19:45 +01:00
else ( )
set ( HAVE_MRUBY 0 )
set ( HAVE_NEVERBLEED 0 )
2016-02-11 15:49:39 +01:00
endif ( )
# Python bindings
if ( ENABLE_PYTHON_BINDINGS AND NOT CYTHON AND NOT PYTHONLIBS_FOUND )
# XXX PythonInterp and PythonLibs are looked up before, unreachable check?
2016-02-11 13:46:59 +01:00
# if test "x${request_python_bindings}" != "xno" &&
# test "x${CYTHON}" != "x" &&
# test "x${PYTHON}" != "x:" &&
# test "x${have_python_dev}" = "xyes"; then
2016-02-11 15:49:39 +01:00
message ( FATAL_ERROR "python bindings were requested (ENABLE_PYTHON_BINDINGS=1) but dependencies are not met." )
endif ( )
2016-02-11 16:08:07 +01:00
# Checks for header files.
# XXX AC_HEADER_ASSERT adds --disable-assert which sets -DNDEBUG
2016-02-11 17:12:10 +01:00
include ( CheckIncludeFile )
2016-02-11 16:08:07 +01:00
check_include_file ( "arpa/inet.h" HAVE_ARPA_INET_H )
check_include_file ( "fcntl.h" HAVE_FCNTL_H )
check_include_file ( "inttypes.h" HAVE_INTTYPES_H )
check_include_file ( "limits.h" HAVE_LIMITS_H )
check_include_file ( "netdb.h" HAVE_NETDB_H )
check_include_file ( "netinet/in.h" HAVE_NETINET_IN_H )
check_include_file ( "pwd.h" HAVE_PWD_H )
check_include_file ( "sys/socket.h" HAVE_SYS_SOCKET_H )
check_include_file ( "sys/time.h" HAVE_SYS_TIME_H )
check_include_file ( "syslog.h" HAVE_SYSLOG_H )
check_include_file ( "time.h" HAVE_TIME_H )
check_include_file ( "unistd.h" HAVE_UNISTD_H )
# Checks for typedefs, structures, and compiler characteristics.
2016-02-11 17:12:10 +01:00
# XXX The AC_TYPE_* macros would define suitable types if standard headers do
# not define them. No equivalent in cmake...
2016-02-11 13:46:59 +01:00
# AC_TYPE_SIZE_T
# AC_TYPE_SSIZE_T
# AC_TYPE_UINT8_T
# AC_TYPE_UINT16_T
# AC_TYPE_UINT32_T
# AC_TYPE_UINT64_T
# AC_TYPE_INT8_T
# AC_TYPE_INT16_T
# AC_TYPE_INT32_T
# AC_TYPE_INT64_T
# AC_TYPE_OFF_T
# AC_TYPE_PID_T
# AC_TYPE_UID_T
2016-02-11 17:12:10 +01:00
# XXX To support inline for crappy compilers, see https://cmake.org/Wiki/CMakeTestInline
2016-02-11 13:46:59 +01:00
# AC_C_INLINE
2016-02-11 17:12:10 +01:00
# XXX is AC_SYS_LARGEFILE still needed for modern systems?
# add_definitions(-D_FILE_OFFSET_BITS=64)
2016-02-11 16:08:07 +01:00
include ( CheckStructHasMember )
2016-02-11 17:54:30 +01:00
check_struct_has_member ( "struct tm" tm_gmtoff time.h HAVE_STRUCT_TM_TM_GMTOFF )
2016-02-11 16:08:07 +01:00
# Check size of pointer to decide we need 8 bytes alignment adjustment.
include ( CheckTypeSize )
check_type_size ( "int *" SIZEOF_INT_P )
check_type_size ( "time_t" SIZEOF_TIME_T )
2016-02-11 17:12:10 +01:00
# Checks for library functions.
include ( CheckFunctionExists )
2016-02-11 17:54:30 +01:00
check_function_exists ( _Exit HAVE__EXIT )
check_function_exists ( accept4 HAVE_ACCEPT4 )
2016-02-11 17:12:10 +01:00
# timerfd_create was added in linux kernel 2.6.25
include ( CheckSymbolExists )
# XXX does this correctly detect initgroups (un)availability on cygwin?
2016-02-11 17:54:30 +01:00
check_symbol_exists ( initgroups grp.h HAVE_DECL_INITGROUPS )
2016-02-11 17:12:10 +01:00
2016-02-11 17:54:30 +01:00
check_function_exists ( timerfd_create HAVE_TIMERFD_CREATE )
2016-02-11 17:12:10 +01:00
# Checks for epoll availability, primarily for examples/tiny-nghttpd
2016-02-11 17:54:30 +01:00
check_symbol_exists ( epoll_create sys/epoll.h HAVE_EPOLL )
2016-02-11 17:12:10 +01:00
if ( HAVE_EPOLL AND HAVE_TIMERFD_CREATE )
set ( ENABLE_TINY_NGHTTPD 1 )
endif ( )
2016-02-11 17:54:30 +01:00
if ( ENABLE_WERROR )
# For C compiler
extract_valid_c_flags ( WARNCFLAGS
- W a l l
- W e x t r a
- W e r r o r
- W m i s s i n g - p r o t o t y p e s
- W s t r i c t - p r o t o t y p e s
- W m i s s i n g - d e c l a r a t i o n s
- W p o i n t e r - a r i t h
- W d e c l a r a t i o n - a f t e r - s t a t e m e n t
- W f o r m a t - s e c u r i t y
- W w r i t e - s t r i n g s
- W s h a d o w
- W i n l i n e
- W n e s t e d - e x t e r n s
- W f l o a t - e q u a l
- W u n d e f
- W e n d i f - l a b e l s
- W e m p t y - b o d y
- W c a s t - a l i g n
- W c l o b b e r e d
- W v l a
- W p r a g m a s
- W u n r e a c h a b l e - c o d e
- W a d d r e s s
- W a t t r i b u t e s
- W d i v - b y - z e r o
- W s h o r t e n - 6 4 - t o - 3 2
- W c o n v e r s i o n
- W e x t e n d e d - o f f s e t o f
- W f o r m a t - n o n l i t e r a l
- W l a n g u a g e - e x t e n s i o n - t o k e n
- W m i s s i n g - f i e l d - i n i t i a l i z e r s
- W m i s s i n g - n o r e t u r n
- W m i s s i n g - v a r i a b l e - d e c l a r a t i o n s
# Not used because we cannot change public structs
# -Wpadded
- W s i g n - c o n v e r s i o n
# Not used because this basically disallows default case
# -Wswitch-enum
- W u n r e a c h a b l e - c o d e - b r e a k
- W u n u s e d - m a c r o s
- W u n u s e d - p a r a m e t e r
- W r e d u n d a n t - d e c l s
# Only work with Clang for the moment
- W h e a d e r - g u a r d
)
extract_valid_cxx_flags ( WARNCXXFLAGS
# For C++ compiler
- W a l l
- W e r r o r
- W f o r m a t - s e c u r i t y
)
endif ( )
extract_valid_c_flags ( EXTRACFLAG
- f v i s i b i l i t y = h i d d e n
)
if ( ENABLE_DEBUG )
set ( DEBUGBUILD 1 )
endif ( )
2016-02-11 18:06:21 +01:00
# Some platform does not have working std::future. We disable
# threading for those platforms.
if ( NOT ENABLE_THREADS OR NOT HAVE_STD_FUTURE )
set ( NOTHREADS 1 )
endif ( )
2016-02-11 13:46:59 +01:00
# # propagate $enable_static to tests/Makefile.am
# AM_CONDITIONAL([ENABLE_STATIC], [test "x$enable_static" = "xyes"])
#
# AC_SUBST([TESTLDADD])
# AC_SUBST([APPLDFLAGS])
2016-02-11 18:06:21 +01:00
2016-02-11 22:11:14 +01:00
add_definitions ( -DHAVE_CONFIG_H )
2016-02-11 18:06:21 +01:00
configure_file ( cmakeconfig.h.in config.h )
# autotools-compatible names
set ( top_srcdir "${CMAKE_SOURCE_DIR}" )
set ( top_builddir "${CMAKE_BINARY_DIR}" )
set ( abs_top_srcdir "${CMAKE_SOURCE_DIR}" )
set ( abs_top_builddir "${CMAKE_BINARY_DIR}" )
2016-02-11 18:42:40 +01:00
# libnghttp2.pc (pkg-config file)
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
2016-02-11 22:11:14 +01:00
set ( exec_prefix "${CMAKE_INSTALL_PREFIX}" )
set ( libdir "${CMAKE_INSTALL_LIBDIR}" )
set ( includedir "${CMAKE_INSTALL_INCLUDEDIR}" )
2016-02-11 18:06:21 +01:00
set ( VERSION "${PACKAGE_VERSION}" )
2016-02-11 18:42:40 +01:00
# For init scripts and systemd service file
2016-02-11 22:11:14 +01:00
set ( bindir "${CMAKE_INSTALL_FULL_BINDIR}" )
set ( sbindir "${CMAKE_INSTALL_FULL_SBINDIR}" )
2016-02-11 18:06:21 +01:00
foreach ( name
l i b / l i b n g h t t p 2 . p c
l i b / i n c l u d e s / n g h t t p 2 / n g h t t p 2 v e r . h
s r c / l i b n g h t t p 2 _ a s i o . p c
p y t h o n / s e t u p . p y
i n t e g r a t i o n - t e s t s / c o n f i g . g o
i n t e g r a t i o n - t e s t s / s e t e n v
d o c / c o n f . p y
d o c / i n d e x . r s t
d o c / p a c k a g e _ R E A D M E . r s t
d o c / t u t o r i a l - c l i e n t . r s t
d o c / t u t o r i a l - s e r v e r . r s t
d o c / t u t o r i a l - h p a c k . r s t
d o c / n g h t t p x - h o w t o . r s t
d o c / h 2 l o a d - h o w t o . r s t
d o c / l i b n g h t t p 2 _ a s i o . r s t
d o c / p y t h o n - a p i r e f . r s t
d o c / b u i l d i n g - a n d r o i d - b i n a r y . r s t
d o c / n g h t t p 2 . h . r s t
d o c / n g h t t p 2 v e r . h . r s t
d o c / a s i o _ h t t p 2 . h . r s t
d o c / a s i o _ h t t p 2 _ s e r v e r . h . r s t
d o c / a s i o _ h t t p 2 _ c l i e n t . h . r s t
d o c / c o n t r i b u t e . r s t
)
configure_file ( "${name}.in" "${name}" @ONLY )
endforeach ( )
2016-02-11 22:11:14 +01:00
add_subdirectory ( lib )
#add_subdirectory(lib/includes)
if ( 0 )
add_subdirectory ( third-party )
add_subdirectory ( src )
#add_subdirectory(src/includes)
add_subdirectory ( examples )
add_subdirectory ( python )
add_subdirectory ( tests )
#add_subdirectory(tests/testdata)
add_subdirectory ( integration-tests )
add_subdirectory ( doc )
add_subdirectory ( contrib )
add_subdirectory ( script )
endif ( )
2016-02-11 18:19:45 +01:00
# XXX - fix list of variables
message ( STATUS " summary of build options:
P a c k a g e v e r s i o n : $ { V E R S I O N }
2016-02-11 22:11:14 +01:00
L i b r a r y v e r s i o n : $ { L T _ C U R R E N T } : $ { L T _ R E V I S I O N } : $ { L T _ A G E }
2016-02-11 18:19:45 +01:00
I n s t a l l p r e f i x : $ { p r e f i x }
S y s t e m t y p e s :
B u i l d : $ { b u i l d }
H o s t : $ { h o s t }
T a r g e t : $ { t a r g e t }
C o m p i l e r :
C c o m p i l e r : $ { C M A K E _ C _ C O M P I L E R }
C F L A G S : $ { C M A K E _ C _ F L A G S }
C + + c o m p i l e r : $ { C M A K E _ C X X _ C O M P I L E R }
C X X F L A G S : $ { C M A K E _ C X X _ F L A G S }
W A R N C F L A G S : $ { W A R N C F L A G S }
C X X 1 X C X X F L A G S : $ { C X X 1 X C X X F L A G S }
E X T R A C F L A G : $ { E X T R A C F L A G }
L I B S : $ { L I B S }
L i b r a r y :
S h a r e d : $ { e n a b l e _ s h a r e d }
S t a t i c : $ { e n a b l e _ s t a t i c }
P y t h o n :
P y t h o n : $ { P Y T H O N }
P Y T H O N _ V E R S I O N : $ { P Y T H O N _ V E R S I O N }
p y e x e c d i r : $ { p y e x e c d i r }
P y t h o n - d e v : $ { h a v e _ p y t h o n _ d e v }
P Y T H O N _ C P P F L A G S : $ { P Y T H O N _ C P P F L A G S }
P Y T H O N _ L D F L A G S : $ { P Y T H O N _ L D F L A G S }
C y t h o n : $ { C Y T H O N }
T e s t :
C U n i t : $ { H A V E _ C U N I T } ( C F L A G S = ' $ { C U N I T _ C F L A G S } ' L I B S = ' $ { C U N I T _ L I B S } ' )
F a i l m a l l o c : $ { E N A B L E _ F A I L M A L L O C }
L i b s :
O p e n S S L : $ { H A V E _ O P E N S S L } ( C F L A G S = ' $ { O P E N S S L _ C F L A G S } ' L I B S = ' $ { O P E N S S L _ L I B S } ' )
L i b x m l 2 : $ { H A V E _ L I B X M L 2 } ( C F L A G S = ' $ { X M L _ C P P F L A G S } ' L I B S = ' $ { X M L _ L I B S } ' )
L i b e v : $ { H A V E _ L I B E V } ( C F L A G S = ' $ { L I B E V _ C F L A G S } ' L I B S = ' $ { L I B E V _ L I B S } ' )
Libevent ( SSL ) : $ { H A V E _ L I B E V E N T _ O P E N S S L } ( C F L A G S = ' $ { L I B E V E N T _ O P E N S S L _ C F L A G S } ' L I B S = ' $ { L I B E V E N T _ O P E N S S L _ L I B S } ' )
S p d y l a y : $ { H A V E _ S P D Y L A Y } ( C F L A G S = ' $ { L I B S P D Y L A Y _ C F L A G S } ' L I B S = ' $ { L I B S P D Y L A Y _ L I B S } ' )
J a n s s o n : $ { H A V E _ J A N S S O N } ( C F L A G S = ' $ { J A N S S O N _ C F L A G S } ' L I B S = ' $ { J A N S S O N _ L I B S } ' )
J e m a l l o c : $ { H A V E _ J E M A L L O C } ( L I B S = ' $ { J E M A L L O C _ L I B S } ' )
Z l i b : $ { H A V E _ Z L I B } ( C F L A G S = ' $ { Z L I B _ C F L A G S } ' L I B S = ' $ { Z L I B _ L I B S } ' )
B o o s t C P P F L A G S : $ { B O O S T _ C P P F L A G S }
B o o s t L D F L A G S : $ { B O O S T _ L D F L A G S }
B o o s t : : A S I O : $ { B O O S T _ A S I O _ L I B }
B o o s t : : S y s t e m : $ { B O O S T _ S Y S T E M _ L I B }
B o o s t : : T h r e a d : $ { B O O S T _ T H R E A D _ L I B }
T h i r d - p a r t y :
h t t p - p a r s e r : $ { E N A B L E _ T H I R D _ P A R T Y }
M R u b y : $ { H A V E _ M R U B Y } ( C F L A G S = ' $ { L I B M R U B Y _ C F L A G S } ' L I B S = ' $ { L I B M R U B Y _ L I B S } ' )
N e v e r b l e e d : $ { H A V E _ N E V E R B L E E D }
F e a t u r e s :
A p p l i c a t i o n s : $ { E N A B L E _ A P P }
H P A C K t o o l s : $ { E N A B L E _ H P A C K _ T O O L S }
L i b n g h t t p 2 _ a s i o : $ { E N A B L E _ A S I O _ L I B }
E x a m p l e s : $ { E N A B L E _ E X A M P L E S }
P y t h o n b i n d i n g s : $ { E N A B L E _ P Y T H O N _ B I N D I N G S }
T h r e a d i n g : $ { E N A B L E _ T H R E A D S }
" )