summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-04 18:28:10 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-04 18:29:03 +0100
commit119244d9b13e84eb898f9fb97e83cac260c1a0b5 (patch)
tree25ebecfa7b835f50f80fc65aa846880b0a988680 /CMakeLists.txt
parent70e4f40d0dd3f58da107789abc4ada1a40b91c42 (diff)
add basic tls support, todo: error handling
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc8b1d3..8d0c1b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,8 @@ 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)
@@ -14,5 +16,11 @@ IF(LIBS STREQUAL "LIBS-NOTFOUND")
SET(LIBS "")
ENDIF()
-ADD_EXECUTABLE(uhttpd main.c listen.c client.c utils.c file.c auth.c cgi.c relay.c proc.c)
-TARGET_LINK_LIBRARIES(uhttpd ubox ${LIBS})
+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})