X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuhttpd.git;a=blobdiff_plain;f=CMakeLists.txt;h=cd22fc76fe5df2dae56ab35de2a091f1a66283d3;hp=7273df6bb0b82535b4194baea4a36e9f264c2d00;hb=ac7670faba12e23b8ec7e866dcfe1d98d3921b40;hpb=991c32db310dba0cd99265d5360ecdbfd0fc3e89;ds=sidebyside diff --git a/CMakeLists.txt b/CMakeLists.txt index 7273df6..cd22fc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 2.6) PROJECT(uhttpd C) + +INCLUDE (CheckFunctionExists) + SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") ADD_DEFINITIONS(-Os -Wall -Werror -Wmissing-declarations --std=gnu99 -g3) @@ -24,6 +27,11 @@ IF(TLS_SUPPORT) ADD_DEFINITIONS(-DHAVE_TLS) ENDIF() +CHECK_FUNCTION_EXISTS(getspnam HAVE_SHADOW) +IF(HAVE_SHADOW) + ADD_DEFINITIONS(-DHAVE_SHADOW) +ENDIF() + ADD_EXECUTABLE(uhttpd ${SOURCES}) TARGET_LINK_LIBRARIES(uhttpd ubox dl ${LIBS}) @@ -60,7 +68,7 @@ ENDIF() IF(UBUS_SUPPORT) SET(PLUGINS ${PLUGINS} uhttpd_ubus) ADD_DEFINITIONS(-DHAVE_UBUS) - ADD_LIBRARY(uhttpd_ubus MODULE ubus.c ubus-session.c) + ADD_LIBRARY(uhttpd_ubus MODULE ubus.c) TARGET_LINK_LIBRARIES(uhttpd_ubus ubus ubox blobmsg_json json) ENDIF()