1project(lws-api-test-lwsac 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-api-test-lwsac) 9set(SRCS main.c) 10 11add_executable(${SAMP} ${SRCS}) 12add_test(NAME api-test-lwsac COMMAND lws-api-test-lwsac) 13 14if (websockets_shared) 15 target_link_libraries(${SAMP} websockets_shared ${LIBWEBSOCKETS_DEP_LIBS}) 16 add_dependencies(${SAMP} websockets_shared) 17else() 18 target_link_libraries(${SAMP} websockets ${LIBWEBSOCKETS_DEP_LIBS}) 19endif() 20