version 0.1.6
[fms.git] / CMakeLists.txt
index 18a089c..52233e8 100644 (file)
@@ -46,6 +46,9 @@ src/freenet/captcha/simplecaptcha.cpp
 src/freenet/captcha/easybmp/EasyBMP.cpp\r
 src/freenet/captcha/easybmp/EasyBMP_Font.cpp\r
 src/freenet/captcha/easybmp/EasyBMP_Geometry.cpp\r
+src/http/httpthread.cpp\r
+src/http/ipagehandler.cpp\r
+src/http/pages/homepage.cpp\r
 src/nntp/nntpconnection.cpp\r
 src/nntp/nntplistener.cpp\r
 src/nntp/uwildmat.cpp\r
@@ -74,8 +77,8 @@ ENDIF(WIN32)
 \r
 FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s)\r
 FIND_LIBRARY(TINYXML_LIBRARY NAMES tinyxml tinyxml_s)\r
-#FIND_LIBRARY(ZTHREADS_LIBRARY NAMES zthread ZThread zthread_s)\r
 FIND_LIBRARY(PTHREADS_LIBRARY NAMES pthread pthreads pthreadvc2)\r
+FIND_LIBRARY(SHTTPD_LIBRARY NAMES shttpd)\r
 \r
 IF(SQLITE3_LIBRARY)\r
        TARGET_LINK_LIBRARIES(fms ${SQLITE3_LIBRARY})\r
@@ -98,14 +101,23 @@ ELSE(TINYXML_LIBRARY)
        INCLUDE_DIRECTORIES(libs/tinyxml)\r
 ENDIF(TINYXML_LIBRARY)\r
 \r
-#IF(ZTHREADS_LIBRARY)\r
-#      TARGET_LINK_LIBRARIES(fms ${ZTHREADS_LIBRARY})\r
-#ELSE(ZTHREADS_LIBRARY)\r
-#      MESSAGE(FATAL_ERROR "Could not find ZThreads library.  You must set the location manually.")\r
-#ENDIF(ZTHREADS_LIBRARY)\r
-\r
 IF(PTHREADS_LIBRARY)\r
        TARGET_LINK_LIBRARIES(fms ${PTHREADS_LIBRARY})\r
 ELSE(PTHREADS_LIBRARY)\r
        MESSAGE(FATAL ERROR "Could not find pthreads library.  You must set the location manually.")\r
 ENDIF(PTHREADS_LIBRARY)\r
+\r
+IF(SHTTPD_LIBRARY)\r
+       TARGET_LINK_LIBRARIES(fms ${SHTTPD_LIBRARY})\r
+ELSE(SHTTPD_LIBRARY)\r
+       MESSAGE(STATUS "Could not find shttpd library.  Will compile from included source.")\r
+       ADD_DEFINITIONS(-DEMBEDDED -DNO_GUI)\r
+       INCLUDE_DIRECTORIES(libs/shttpd/include)\r
+       IF(WIN32)\r
+               SET(SHTTPD_PLATFORM_SRC libs/shttpd/compat_win32.c)\r
+       ELSE(WIN32)\r
+               SET(SHTTPD_PLATFORM_SRC libs/shttpd/compat_unix.c)\r
+       ENDIF(WIN32)\r
+       ADD_LIBRARY(shttpd ${SHTTPD_PLATFORM_SRC} libs/shttpd/auth.c libs/shttpd/cgi.c libs/shttpd/config.c libs/shttpd/io_cgi.c libs/shttpd/io_dir.c libs/shttpd/io_emb.c libs/shttpd/io_file.c libs/shttpd/io_socket.c libs/shttpd/io_ssi.c libs/shttpd/io_ssl.c libs/shttpd/log.c libs/shttpd/md5.c libs/shttpd/mime_type.c libs/shttpd/shttpd.c libs/shttpd/string.c)\r
+       TARGET_LINK_LIBRARIES(fms shttpd)\r
+ENDIF(SHTTPD_LIBRARY)\r