Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ elseif(EVHTP_ALLOCATOR STREQUAL "tcmalloc")
endif()
endif()

add_library(evhtp ${LIBEVHTP_SOURCE_FILES})
if(NOT EVHTP_BUILD_SHARED)
add_library(evhtp ${LIBEVHTP_SOURCE_FILES})
else()
add_library(evhtp SHARED ${LIBEVHTP_SOURCE_FILES})
target_link_options(evhtp PUBLIC "-Wl,-z,now")
endif()

target_link_libraries(evhtp PUBLIC ${LIBEVHTP_EXTERNAL_LIBS})
target_include_directories(evhtp PUBLIC ${LIBEVHTP_EXTERNAL_INCLUDES})

Expand Down
5 changes: 4 additions & 1 deletion cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ find_package(Oniguruma)
option (EVHTP_DISABLE_REGEX "Disable regex support" OFF)

# -DEVHTP_DEBUG=ON
option (EVHTP_DEBUG "Enable verbose debug logging" OFF)
option (EVHTP_DEBUG "Enable verbose debug logging" OFF)

# -DEVHTP_BUILD_SHARED=ON
option (EVHTP_BUILD_SHARED "Build shared libraries" OFF)

# can be overwritten by new set_alloc functions
set(EVHTP_ALLOCATOR CACHE STRING "Allocator library")
Expand Down