Commit Graph

21 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 9e6c0685a2 Fix build failure 2021-05-15 13:51:24 +09:00
Tatsuhiro Tsujikawa 4ecdc2903d Amend 7a57b039a6 2020-07-26 15:31:54 +09:00
Tatsuhiro Tsujikawa 7a57b039a6 Fix cmake build 2020-07-26 15:19:19 +09:00
Viktor Szakats 9bc2c75e38 lib/CMakeLists.txt: Make hard-coded static lib suffix optional
It can be set via the `STATIC_LIB_SUFFIX` variable.

This fixes every existing dependent project that relied on the name
having no suffix and thus capable of using either a static or shared
flavour depending on which one is present on this or how the linker
is configured.

Ref: https://github.com/nghttp2/nghttp2/pull/1394
2019-11-15 20:53:50 +00:00
William A Rowe Jr 28b1f0b90f Avoid filename collision of static and dynamic lib
Renames the output of the ENABLE_STATIC_LIB library/archive output
to nghttp2_static.lib/.a to avoid filenames colliding with the output
name for ENABLE_SHARED_LIB library/archive, when both are enabled.

Signed-off-by: William A Rowe Jr <wrowe@pivotal.io>
Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>
2019-09-16 08:48:35 -07:00
Don 2591960e2f Explicitly set install location when building shared libs 2019-02-06 10:26:30 -08:00
Brendan Heinonen 7e4c48a461 Disable shared library if ENABLE_SHARED_LIB is OFF
Signed-off-by: Brendan Heinonen <brendan@heinonen.co>
2018-12-27 13:06:02 -05:00
Viktor Szakats f342260bfe cmake: add ENABLE_STATIC_LIB option to build static lib
When using the ENABLE_LIB_ONLY option, only the shared
library was built. This new option allows to build the
static library as well.
2018-03-12 22:41:37 +00:00
Dmitriy Vetutnev af926fbe1f Refactoring include directories for build as CMake subdirectory (add_subdirectory(nghttp2)) 2017-08-16 21:28:12 +03:00
Remo E 9cd695a1db MSVC version resource support 2016-10-28 22:24:22 +09:00
Anders Bakken bc3dc6b765 Add set_nghttp2_debug_callback to take advantage of DEBUGF statements in
when building DEBUGBUILD.
2016-10-13 13:24:26 -07:00
Peter Wu bd253e1bdd cmake: fix Windows build with CUnit
failmalloc and main tests succesfully pass the test now.
2016-03-17 23:32:07 +01: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 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 7f8110601e cmake: fix compatibility with cmake before 3.3
The COMPILE_LANGUAGE generator expression is only supported since CMake
3.3. Moreover, it does not work with all generators (works with Makefile
and Ninja, but not with Visual Studio).

target_compile_options would only work if a target does not mix C and
C++ sources, since the flags are intended to be set for a specific
language, use set_source_files_properties instead. This approach is also
less repetitive.

Drop the idea of using lists and COMPILE_OPTIONS,
set_source_files_properties only understands COMPILE_FLAGS (a single
string, not a list).
2016-03-13 12:30:41 +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 0afc21c9d8 cmake: fix compilation in lib
Need to add -fPIC to objects that will be put in a shared library.
2016-02-15 10:49:55 +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 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
Peter Wu 5b21c39bb2 cmake: add lib, add versioning info, install lib
Also remove some headers which were not checked anyway and add macros to
cmakeconfig.h.in (based on the headers list in the CMakeLists.txt file).
2016-02-13 20:13:42 +01:00