From: Shuanglei Tao Date: Sat, 16 Mar 2019 03:17:36 +0000 (+0800) Subject: cmake: fix compile on macOS X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=80bcfeec338a00c13ffe68fc14c512e46229f611;p=ttyd.git cmake: fix compile on macOS --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bba1f7e..2381e8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()