Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'cmake-tcf-lib.txt')
-rw-r--r--cmake-tcf-lib.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake-tcf-lib.txt b/cmake-tcf-lib.txt
index 3ac2af48..d28a8b24 100644
--- a/cmake-tcf-lib.txt
+++ b/cmake-tcf-lib.txt
@@ -80,3 +80,21 @@ if(DEFINED TCF_PLUGIN_PATH)
target_link_libraries(${TCF_LIB_NAME} dl)
endif()
endif()
+
+if (LIBWEBSOCKETSDIR)
+ find_library(LIBWEBSOCKETS NAME "websockets" PATHS ${LIBWEBSOCKETSDIR}/lib NO_DEFAULT_PATH)
+ if (${LIBWEBSOCKETS} STREQUAL "LIBWEBSOCKETS-NOTFOUND")
+ message(FATAL_ERROR "ERROR: Could not find libwebsockets library in directory: " ${LIBWEBSOCKETSDIR})
+ else()
+ message(STATUS "Found libwebsockets library: ${LIBWEBSOCKETS}")
+ endif()
+ include_directories(${LIBWEBSOCKETSDIR}/include/)
+ target_link_libraries(${TCF_LIB_NAME} ${LIBWEBSOCKETS})
+ add_definitions("-DENABLE_LibWebSockets=1")
+ INCLUDE (${CMAKE_ROOT}/Modules/FindOpenSSL.cmake)
+ if (NOT OPENSSL_FOUND)
+ message(FATAL_ERROR "ERROR: Could not find OpenSSL!!!")
+ endif(NOT OPENSSL_FOUND)
+ include_directories(${OPENSSL_INCLUDE_DIR})
+ target_link_libraries(${TCF_LIB_NAME} ${OPENSSL_LIBRARIES})
+endif()

Back to the top