1project(lws-minimal-http-server-fulltext-search C) 2cmake_minimum_required(VERSION 2.8.12) 3find_package(libwebsockets CONFIG REQUIRED) 4list(APPEND CMAKE_MODULE_PATH ${LWS_CMAKE_DIR}) 5include(CheckCSourceCompiles) 6include(LwsCheckRequirements) 7 8set(SAMP lws-minimal-http-server-fulltext-search) 9set(SRCS minimal-http-server.c) 10 11include_directories(../../../plugins) 12 13set(requirements 1) 14require_lws_config(LWS_ROLE_H1 1 requirements) 15require_lws_config(LWS_WITH_FTS 1 requirements) 16require_lws_config(LWS_WITH_SERVER 1 requirements) 17 18if (requirements) 19 add_executable(${SAMP} ${SRCS}) 20 21 if (websockets_shared) 22 target_link_libraries(${SAMP} websockets_shared ${LIBWEBSOCKETS_DEP_LIBS}) 23 add_dependencies(${SAMP} websockets_shared) 24 else() 25 target_link_libraries(${SAMP} websockets ${LIBWEBSOCKETS_DEP_LIBS}) 26 endif() 27endif() 28