Skip to content

Commit

Permalink
cmake: fix compile on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Mar 16, 2019
1 parent 0b44b9b commit 80bcfee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Expand Up @@ -69,7 +69,12 @@ list(APPEND SOURCE_FILES html.h)
set(INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR} ${LIBWEBSOCKETS_INCLUDE_DIR} ${JSON-C_INCLUDE_DIR})
set(LINK_LIBS pthread ${OPENSSL_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES} ${JSON-C_LIBRARY})

if(NOT APPLE)
if(APPLE)
# required for the new homebrew version of libwebsockets
find_path(LIBUV_INCLUDE_DIR NAMES uv.h)
find_path(LIBEVENT_INCLUDE_DIR NAMES event2/event.h)
list(APPEND INCLUDE_DIRS ${LIBUV_INCLUDE_DIR} ${LIBEVENT_INCLUDE_DIR})
else()
list(APPEND LINK_LIBS util)
endif()

Expand Down

0 comments on commit 80bcfee

Please sign in to comment.