2020-07-01 06:48:42 +00:00
|
|
|
include_directories(
|
|
|
|
${CMAKE_SOURCE_DIR}/src
|
|
|
|
${CMAKE_SOURCE_DIR}/src/http-parser
|
|
|
|
${CMAKE_SOURCE_DIR}/src/buffer
|
|
|
|
${CMAKE_BINARY_DIR}/src
|
|
|
|
${LIBEV_INCLUDE_DIR})
|
2017-12-30 04:24:00 +00:00
|
|
|
|
2019-08-27 02:21:37 +00:00
|
|
|
add_executable(example example.c)
|
2020-04-06 17:01:30 +00:00
|
|
|
|
|
|
|
if(BUILD_SHARED_LIBS)
|
|
|
|
target_link_libraries(example uhttpd ${LIBEV_LIBRARY})
|
|
|
|
else()
|
|
|
|
target_link_libraries(example uhttpd_s ${LIBEV_LIBRARY})
|
|
|
|
endif()
|
2020-12-12 06:32:57 +00:00
|
|
|
|
|
|
|
if(HAVE_DLOPEN)
|
|
|
|
add_library(test_plugin MODULE test_plugin.c)
|
|
|
|
set_target_properties(test_plugin PROPERTIES OUTPUT_NAME test_plugin PREFIX "")
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS test_plugin
|
|
|
|
LIBRARY DESTINATION lib/uhttpd
|
|
|
|
)
|
|
|
|
endif()
|