Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Fix cmake include dirs
Browse files Browse the repository at this point in the history
When I used cmake like:
cmake ../ -DCMAKE_INSTALL_PREFIX=path/to/local/builds

library files were added to the link path, but the include dirs were
not, which resulted in a compile error (fatal error: onigposix.h: No
such file or directory)

It was removed here:
https://github.com/criticalstack/libevhtp/pull/79/files#diff-af3b638bc2a3e6c650974192a53c7291L175

Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>
  • Loading branch information
prazek and amharc committed May 10, 2018
1 parent fddb411 commit b7df3fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ set(LIBEVHTP_SOURCE_FILES

find_package(LibEvent REQUIRED)
list(APPEND LIBEVHTP_EXTERNAL_LIBS ${LIBEVENT_LIBRARIES})
list(APPEND LIBEVHTP_EXTERNAL_INCLUDES ${LIBEVENT_INCLUDE_DIRS})

list(APPEND package_deps LibEvent)
set(evhtp_dir_headers
"include/evhtp/evhtp.h"
Expand Down Expand Up @@ -80,6 +82,7 @@ if(NOT EVHTP_DISABLE_REGEX)
find_package(Oniguruma)
if(ONIGURUMA_FOUND)
list(APPEND LIBEVHTP_EXTERNAL_LIBS ${ONIGURUMA_LIBRARIES})
list(APPEND LIBEVHTP_EXTERNAL_INCLUDES ${ONIGURUMA_INCLUDE_DIRS})
list(APPEND package_deps Oniguruma)
else()
message(STATUS "${BoldRed}${CMAKE_BUILD_TYPE}ONIGURUMA NOT FOUND, DISABLING REGEX SUPPORT${ColourReset}")
Expand All @@ -103,6 +106,7 @@ endif()

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

target_compile_definitions(evhtp PUBLIC "PROJECT_VERSION=${PROJECT_VERSION}")
if(has_stack_protector)
Expand Down

0 comments on commit b7df3fc

Please sign in to comment.