diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
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}) |