From 8c0dbb03e1f783723dc8bebe8b95fbcc73358cbf Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 3 May 2013 19:05:36 +0200 Subject: [PATCH] Install httpbf and make it possible to include the header in C++ code --- src/httpbf/CMakeLists.txt | 11 +++++++++++ src/httpbf/src/httpbf.h | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/httpbf/CMakeLists.txt b/src/httpbf/CMakeLists.txt index d7f6bce91..faddcdc68 100644 --- a/src/httpbf/CMakeLists.txt +++ b/src/httpbf/CMakeLists.txt @@ -31,3 +31,14 @@ target_link_libraries(${HTTPBF_LIBRARY} ${NEON_LIBRARIES}) if(NOT WIN32) add_definitions( -fPIC ) endif() + +INSTALL( + TARGETS + ${HTTPBF_LIBRARY} + LIBRARY DESTINATION + ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION + ${LIB_INSTALL_DIR} + RUNTIME DESTINATION + ${BIN_INSTALL_DIR} +) diff --git a/src/httpbf/src/httpbf.h b/src/httpbf/src/httpbf.h index b61fb7779..020bfe363 100644 --- a/src/httpbf/src/httpbf.h +++ b/src/httpbf/src/httpbf.h @@ -25,6 +25,11 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + + enum hbf_state_e { HBF_SUCCESS, HBF_NOT_TRANSFERED, /* never tried to transfer */ @@ -99,4 +104,9 @@ const char *hbf_error_string( Hbf_State state ); */ int hbf_fail_http_code( hbf_transfer_t *transfer ); +#ifdef __cplusplus +} +#endif + + #endif