link against libcrypt
authorFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 13:13:13 +0000 (14:13 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 13:13:13 +0000 (14:13 +0100)
CMakeLists.txt

index afa276616f5ac9076a7e43d38941af5d87acf5b7..e354204f4495386addbb75d431422911b97f7de5 100644 (file)
@@ -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})