blob: 8d0c1b093462ff550b22f4ae776b3c2390a6753f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
cmake_minimum_required(VERSION 2.6)
PROJECT(uhttpd C)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
ADD_DEFINITIONS(-Os -Wall -Werror -Wmissing-declarations --std=gnu99 -g3)
OPTION(TLS_SUPPORT "TLS support" ON)
IF(APPLE)
INCLUDE_DIRECTORIES(/opt/local/include)
LINK_DIRECTORIES(/opt/local/lib)
ENDIF()
FIND_LIBRARY(LIBS crypt)
IF(LIBS STREQUAL "LIBS-NOTFOUND")
SET(LIBS "")
ENDIF()
SET(SOURCES main.c listen.c client.c utils.c file.c auth.c cgi.c relay.c proc.c)
IF(TLS_SUPPORT)
SET(SOURCES ${SOURCES} tls.c)
ADD_DEFINITIONS(-DHAVE_TLS)
ENDIF()
ADD_EXECUTABLE(uhttpd ${SOURCES})
TARGET_LINK_LIBRARIES(uhttpd ubox dl ${LIBS})
|