Find package libwebsockets if the option is ON.

Otherwise, if the package is not installed, configuration will work, but building will fail.

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
This commit is contained in:
Pierre Hallot 2020-12-01 12:05:47 +01:00 committed by Roger Light
parent 2afc5783a9
commit 8f0bdd5fd3

View File

@ -130,6 +130,7 @@ endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
option(WITH_WEBSOCKETS "Include websockets support?" OFF) option(WITH_WEBSOCKETS "Include websockets support?" OFF)
option(STATIC_WEBSOCKETS "Use the static libwebsockets library?" OFF) option(STATIC_WEBSOCKETS "Use the static libwebsockets library?" OFF)
if (WITH_WEBSOCKETS) if (WITH_WEBSOCKETS)
find_package(libwebsockets)
add_definitions("-DWITH_WEBSOCKETS") add_definitions("-DWITH_WEBSOCKETS")
endif (WITH_WEBSOCKETS) endif (WITH_WEBSOCKETS)