cmake: add neverbleed support

This commit is contained in:
Peter Wu 2016-02-15 10:50:31 +01:00
parent 0afc21c9d8
commit 474ecc4b47
2 changed files with 12 additions and 16 deletions

View File

@ -143,13 +143,7 @@ if(ENABLE_APP)
endif() endif()
if(HAVE_NEVERBLEED) if(HAVE_NEVERBLEED)
target_include_directories(nghttpx PRIVATE target_link_libraries(nghttpx neverbleed)
"${CMAKE_SOURCE_DIR}/third-party/neverbleed"
)
target_link_libraries(nghttpx
# FIXME .la does not work ofc...
"${CMAKE_BINARY_DIR}/third-party/libneverbleed.la"
)
endif() endif()
@ -186,11 +180,10 @@ if(ENABLE_APP)
# -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@ # -L${top_builddir}/third-party/mruby/build/lib @LIBMRUBY_LIBS@
# endif # HAVE_MRUBY # endif # HAVE_MRUBY
# #
# if HAVE_NEVERBLEED if(HAVE_NEVERBLEED)
# nghttpx_unittest_CPPFLAGS += -I${top_srcdir}/third-party/neverbleed target_link_libraries(nghttpx-unittest neverbleed)
# nghttpx_unittest_LDADD += ${top_builddir}/third-party/libneverbleed.la endif()
# endif # HAVE_NEVERBLEED
#
add_test(nghttpx-unittest nghttpx-unittest) add_test(nghttpx-unittest nghttpx-unittest)
endif() endif()

View File

@ -5,12 +5,15 @@ if(ENABLE_THIRD_PARTY)
add_library(http-parser OBJECT ${LIBHTTP_PARSER_SOURCES}) add_library(http-parser OBJECT ${LIBHTTP_PARSER_SOURCES})
if(HAVE_NEVERBLEED) if(HAVE_NEVERBLEED)
set(LIBNEVERBLEED_SOURCES set(NEVERBLEED_SOURCES
neverbleed/neverbleed.c neverbleed/neverbleed.c
) )
add_library(libneverbleed ${LIBNEVERBLEED_SOURCES}) add_library(neverbleed ${NEVERBLEED_SOURCES})
target_include_directories(libneverbleed PUBLIC ${OPENSSL_INCLUDE_DIRS}) target_include_directories(neverbleed PRIVATE ${OPENSSL_INCLUDE_DIRS})
target_link_libraries(libneverbleed ${OPENSSL_LIBRARIES}) target_include_directories(neverbleed INTERFACE
"${CMAKE_SOURCE_DIR}/third-party/neverbleed"
)
target_link_libraries(neverbleed ${OPENSSL_LIBRARIES})
endif() endif()
if(HAVE_MRUBY) if(HAVE_MRUBY)