summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index afa2766..e354204 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,5 +8,10 @@ IF(APPLE)
LINK_DIRECTORIES(/opt/local/lib)
ENDIF()
+FIND_LIBRARY(LIBS crypt)
+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 ubus)
+TARGET_LINK_LIBRARIES(uhttpd ubox ${LIBS})