Commit Graph

61 Commits

Author SHA1 Message Date
Anders Bakken 857791dbb9 Make it possible to include nghttp2/CMakeLists.txt in another project
using add_subdirectory.

CMAKE_SOURCE_DIR/CMAKE_BINARY_DIR points to the top level
CMakeLists.txt. This isn't necessarily nghttp2/CMakeLists.txt.
2016-10-12 08:23:20 -07:00
Tatsuhiro Tsujikawa 97aa4dabc8 Bump up version number to 1.16.0-DEV 2016-09-25 12:17:45 +09:00
Tatsuhiro Tsujikawa 13eb881e5e Bump up version number to 1.15.0, LT revision to 25:0:11 2016-09-25 11:36:15 +09:00
Tatsuhiro Tsujikawa b14375ec63 Bump up LT revision to 24:1:10 due to v1.14.1 release
This also fixes LT revision in CMakeLists.txt, which was not updated
in v1.14.0 release.
2016-09-10 12:52:37 +09:00
Tatsuhiro Tsujikawa 833cd962a1 Bump up version number to 1.15.0-DEV 2016-08-25 23:25:42 +09:00
Tatsuhiro Tsujikawa 25ea41972a Bump up version number to 1.14.0, LT revision to 24:0:10 2016-08-25 22:41:17 +09:00
Tatsuhiro Tsujikawa 767ed255ca Bump up version number to 1.14.0-DEV 2016-07-21 22:53:26 +09:00
Tatsuhiro Tsujikawa 3bdc143474 Bump up version number to 1.13.0, LT revision to 23:0:9 2016-07-21 21:20:52 +09:00
Tatsuhiro Tsujikawa 3fadad1bf3 Bump up version number to 1.13.0-DEV 2016-06-26 22:44:40 +09:00
Tatsuhiro Tsujikawa c7210908df Bump up version number to 1.12.0 2016-06-26 19:58:44 +09:00
Tatsuhiro Tsujikawa 046ec307c3 Bump up version number to 1.12.0-DEV 2016-05-26 23:04:46 +09:00
Tatsuhiro Tsujikawa c4fba5139c Bump up version number to 1.11.0, LT revision to 22:0:8 2016-05-26 22:33:17 +09:00
Tatsuhiro Tsujikawa 220f49b157 Bump up version number to 1.11.0-DEV 2016-04-25 22:41:48 +09:00
Tatsuhiro Tsujikawa 7d7dc830ef Bump up version number to 1.10.0, LT revision to 21:0:7 2016-04-25 22:01:26 +09:00
Tatsuhiro Tsujikawa 402eccf06d Bump up version number to 1.10.0-DEV 2016-03-27 22:29:09 +09:00
Tatsuhiro Tsujikawa 2928afa51f Bump up version number to 1.9.1 2016-03-27 22:04:26 +09:00
Tatsuhiro Tsujikawa 8a539420c2 Bump up version number to 1.10.0-DEV 2016-03-26 23:19:13 +09:00
Tatsuhiro Tsujikawa afe724ecda Bump up version number to 1.9.0, LT revision to 20:0:6 2016-03-26 22:59:09 +09:00
Peter Wu d10f149161 cmake: fix Windows support
Fix Windows build by defining `ssize_t` when missing and adjusting the
install commands.

Add support for ENABLE_WERROR=1 while at it.

Tested with MSVC 2013 on Windows 7 x64.
2016-03-16 17:33:20 +01:00
Peter Wu 3a2a943fe9 cmake: do not fail without libxml2
Avoid adding a LIBXML2_LIBRARIES-NOTFOUND to the libraries list when it
is not found. Likewise for OpenSSL.
2016-03-16 17:33:10 +01:00
Peter Wu f34971774b cmake: use -std=c++11 instead of -std=gnu+11
Matches autotools behavior. The m4_if logic was misread...
2016-03-16 14:52:42 +01:00
Peter Wu f8a9a21428 cmake: add _U_ and NGHTTP2_NORETURN to config.h
Do not add _U_ and NGHTTP2_NORETURN definitions to the command line,
instead add it to config.h. This matches what autotools does.
2016-03-16 14:25:58 +01:00
Peter Wu 0c49e5d56e cmake: enable assertions by default
Users can disable this by setting -DCMAKE_C_FLAGS=-DNDEBUG or
-DCMAKE_CXX_FLAGS=-DNDEBUG to disable assertions as desired.
2016-03-16 14:10:42 +01:00
Peter Wu b348a02b85 cmake: fix printed C/CXX flags
Build type-specific flags are added before other flags, reflect this in
the output.
2016-03-15 13:58:53 +01:00
Peter Wu 439636c579 cmake: set CMAKE_BUILD_TYPE=RelWithDebInfo by default
NOTE: RelWithDebInfo *disables* assertions by default. To keep
assertions, use CMAKE_BUILD_TYPE=Debug or CMAKE_BUILD_TYPE=None.
2016-03-15 13:40:15 +01:00
Peter Wu 2ddb83206b cmake: sync with v1.8.0-63-g37b09f6
Adds missing source files and configure.ac changes since
v1.7.0-93-g093eb51.
2016-03-14 17:20:37 +01:00
Peter Wu dad222b8f4 cmake: fix jemalloc, libevent include dirs
Caught with cmake --warn-uninitialized.
2016-03-13 16:42:35 +01:00
Peter Wu a45540fd79 Lower libev version requirement
libev 4.11 seems to build fine as demonstrated by Travis with autotools.
2016-03-13 13:15:50 +01:00
Peter Wu 618073e2b4 cmake: add "check" target
Add a "check" target that builds tests before running them.
2016-03-12 00:57:30 +01:00
Peter Wu 9ab5ef3b5b cmake: make find_package non-QUIET
Also fix useless MRUBY_LIBRARIES output and add the CMake build type
(e.g. Release, Debug, etc.)
2016-02-16 16:29:39 +01:00
Peter Wu 4814d14db5 cmake: fix installing nghttp2_asio.pc, manpages, README.rst 2016-02-16 16:25:50 +01:00
Peter Wu 77e8190b6c cmake: fix symbol visibility issues
libnghttp2.so was missing -fvisibility=hidden. libnghttp2_asio.so on the
other hand had hidden visibility which resulted in no exported symbols
and a broken asio client examples.

Just build a static nghttp2 library to solve this issue.
2016-02-16 16:04:01 +01:00
Peter Wu f4b2a4ab00 cmake: always enable warnings without -Werror
Warnings are useful, let's enable them by default.
2016-02-16 14:57:05 +01:00
Peter Wu 3dd57e1f59 cmake: fix feature availability reporting
Some detected libraries were not reported when a feature is disabled.
This change removes unnecessary second find_package calls and sets
HAVE_xxx immediately based on xxx_FOUND.
2016-02-16 14:01:44 +01:00
Peter Wu 1b67b2d33e cmake: improve Spdylay detection
Auto-detect spdylay availability using CMake, making pkg-config
completely optional.
2016-02-16 12:48:36 +01:00
Peter Wu 9bc6dc7113 cmake: add python support
FindCython.cmake was taken from
https://github.com/thewtex/cython-cmake-example. The UseCython module
works, but since it is lacking an installation target setup.py will be
used instead.
2016-02-16 12:17:49 +01:00
Peter Wu f407f7f406 cmake: add mruby support, fix tests dir
mruby is always invoked now (mirrors the autotools behavior). It could
be optimized though to only trigger the mruby build when the static
library is missing.

Also fix typo in NGHTTP2_TESTS_DIR macro definition (detected when
invoking the Ninja generator).
2016-02-15 23:14:27 +01:00
Peter Wu 8c46d9181f cmake: process tests directory
Split the nghttp2 library into objects and a shared library from those
objects. This is needed because of symbol visibility. An advantage over
the autotools build is that there are no worries about static versus
static library builds.

Test:

    cmake $srcdir
    make nghttpx-unittest main failmalloc
    make test
2016-02-15 01:57:13 +01:00
Peter Wu cc92ebf471 cmake: add auto-detection, improve library search
Add auto-detection to the most important features (app, hpack, etc.).
Move options to a separate file for easier search.

Add cmake-based Libevent, jansson and CUnit search. Move pkg-config
handling for Libev and jemalloc to their cmake files.

Note: duplicates find_package before including CMakeOptions.txt and when
checking for features. Maybe that can be cleaned up later...
2016-02-15 01:12:07 +01:00
Peter Wu c96cf1b303 cmake: improve final variable list
Remove build/host/target by a single target system name (CMake is
different for cross-compiling, you are suggested to set
CMAKE_TOOLCHAIN_FILE).

Fix various library variables, remove CFLAGS (INCLUDE_DIRS could be used
instead though, but I consider that minor information that could be
added later if wanted).

Fix various variable names (prefix, boost, etc.).
2016-02-14 13:22:32 +01:00
Peter Wu 503f0a29a7 cmake: add integration-tests 2016-02-13 20:13:43 +01:00
Peter Wu ee285fa5da cmake: process script/ 2016-02-13 20:13:43 +01:00
Peter Wu 8c562bd38d cmake: process contrib/ 2016-02-13 20:13:43 +01:00
Peter Wu 15adc23277 cmake: working doc (sphinx-build), out-of-tree! 2016-02-13 20:13:43 +01:00
Peter Wu a2ec695ec9 cmake: add python stub
Might not be the best approach, maybe use thewtex/cython-cmake-example?
2016-02-13 20:13:43 +01:00
Peter Wu 55b270587b cmake: build examples 2016-02-13 20:13:43 +01:00
Peter Wu 5297136bc0 cmake: use PRIVATE instead of PUBLIC
Avoids leaking compile flags to dependents.
2016-02-13 20:13:43 +01:00
Peter Wu 61bb6428fd cmake: add third-party and src
Remaining work:
 - integrate mruby and neverbleed
 - integrate cunit
2016-02-13 20:13:42 +01:00
Peter Wu ccd2d34160 cmake: Install headers 2016-02-13 20:13:42 +01:00
Peter Wu ea6eed10c7 cmake: fix version in soname 2016-02-13 20:13:42 +01:00