From: Shuanglei Tao Date: Sat, 8 Feb 2020 06:11:26 +0000 (+0800) Subject: cmake: cleanup unused config X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=a8c9580e6da7462e14c5a3917117c6567f7b9d8f;p=ttyd.git cmake: cleanup unused config --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9676b00..a99f4db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ find_package(OpenSSL REQUIRED) find_package(ZLIB REQUIRED) find_package(Libwebsockets 1.7.0 QUIET) -if(NOT Libwebsockets_FOUND) +if(NOT Libwebsockets_FOUND) # for libwebsockets-dev on ubuntu 16.04 find_path(LIBWEBSOCKETS_INCLUDE_DIR NAMES libwebsockets.h) find_library(LIBWEBSOCKETS_LIBRARY NAMES websockets) find_package_handle_standard_args(Libwebsockets REQUIRED_VARS LIBWEBSOCKETS_LIBRARY LIBWEBSOCKETS_INCLUDE_DIR) @@ -69,17 +69,10 @@ endif() set(INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${LIBWEBSOCKETS_INCLUDE_DIRS} ${JSON-C_INCLUDE_DIRS} ${LIBUV_INCLUDE_DIRS}) set(LINK_LIBS ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBWEBSOCKETS_LIBRARIES} ${JSON-C_LIBRARIES} ${LIBUV_LIBRARIES}) -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() - if(WIN32) list(APPEND LINK_LIBS shell32) +elseif(NOT APPLE) + list(APPEND LINK_LIBS util) endif() add_executable(${PROJECT_NAME} ${SOURCE_FILES})