Skip to content

Commit

Permalink
Adding libevthr dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Ellzey committed May 17, 2011
1 parent 682a5e9 commit cb6df31
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "http_parser"]
path = http_parser
url = https://github.com/ry/http-parser.git
[submodule "evthr"]
path = evthr
url = https://github.com/ellzey/libevthr.git
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
project(reason)

set(PROJECT_MAJOR_VERSION 0)
set(PROJECT_MINOR_VERSION 1)
set(PROJECT_MINOR_VERSION 2)
set(PROJECT_PATCH_VERSION 0)

set (PROJECT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION})
Expand All @@ -19,19 +19,21 @@ find_package(LibEvent)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/evthr
${CMAKE_CURRENT_SOURCE_DIR}/http_parser
)

set(LIBEVHTP_EXTERNAL_LIBS
${LIBEVENT_LIBRARY}
${LIBEVENT_PTHREADS_LIBRARY}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/build
)
set(LIBEVHTP_SOURCES http_parser/http_parser.c evhtp.c)
set(LIBEVHTP_SOURCES evthr/evthr.c http_parser/http_parser.c evhtp.c)

add_library(libevhtp STATIC ${LIBEVHTP_SOURCES})
set_target_properties(libevhtp PROPERTIES OUTPUT_NAME "evhtp")
target_link_libraries(libevhtp ${LIVEVHTP_EXTERNAL_LIBS})

add_executable(test test.c)
target_link_libraries(test libevhtp event)
target_link_libraries(test libevhtp event event_pthreads)
1 change: 1 addition & 0 deletions evthr
Submodule evthr added at 6325ad

0 comments on commit cb6df31

Please sign in to comment.