1d4afb5ceSopenharmony_ciproject(lws-minimal-http-server-eventlib-smp C) 2d4afb5ceSopenharmony_cicmake_minimum_required(VERSION 2.8.12) 3d4afb5ceSopenharmony_cifind_package(libwebsockets CONFIG REQUIRED) 4d4afb5ceSopenharmony_cilist(APPEND CMAKE_MODULE_PATH ${LWS_CMAKE_DIR}) 5d4afb5ceSopenharmony_ciinclude(CheckIncludeFile) 6d4afb5ceSopenharmony_ciinclude(CheckCSourceCompiles) 7d4afb5ceSopenharmony_ciinclude(LwsCheckRequirements) 8d4afb5ceSopenharmony_ci 9d4afb5ceSopenharmony_ciset(SAMP lws-minimal-http-server-eventlib-smp) 10d4afb5ceSopenharmony_ciset(SRCS minimal-http-server-eventlib-smp.c) 11d4afb5ceSopenharmony_ci 12d4afb5ceSopenharmony_ciset(requirements 1) 13d4afb5ceSopenharmony_cirequire_pthreads(requirements) 14d4afb5ceSopenharmony_cirequire_lws_config(LWS_ROLE_H1 1 requirements) 15d4afb5ceSopenharmony_cirequire_lws_config(LWS_WITH_SERVER 1 requirements) 16d4afb5ceSopenharmony_ci 17d4afb5ceSopenharmony_ciif (requirements) 18d4afb5ceSopenharmony_ci add_executable(${SAMP} ${SRCS}) 19d4afb5ceSopenharmony_ci 20d4afb5ceSopenharmony_ci if (websockets_shared) 21d4afb5ceSopenharmony_ci target_link_libraries(${SAMP} websockets_shared ${PTHREAD_LIB} ${LIBWEBSOCKETS_DEP_LIBS}) 22d4afb5ceSopenharmony_ci add_dependencies(${SAMP} websockets_shared ${PTHREAD_LIB}) 23d4afb5ceSopenharmony_ci else() 24d4afb5ceSopenharmony_ci target_link_libraries(${SAMP} websockets ${PTHREAD_LIB} ${LIBWEBSOCKETS_DEP_LIBS}) 25d4afb5ceSopenharmony_ci endif() 26d4afb5ceSopenharmony_ciendif() 27