X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=CMakeLists.txt;h=52233e8f30acc7f5af540c8bc9aa05a35e7e6a6e;hp=18a089cfcfefcb5ffc7afeef0f742b32ce43405d;hb=d8ccfe2b3944adf07d35534459cdda19d15217c8;hpb=21f835f30b4e092c847bf4569a00995774f7330e diff --git a/CMakeLists.txt b/CMakeLists.txt index 18a089c..52233e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,9 @@ src/freenet/captcha/simplecaptcha.cpp src/freenet/captcha/easybmp/EasyBMP.cpp src/freenet/captcha/easybmp/EasyBMP_Font.cpp src/freenet/captcha/easybmp/EasyBMP_Geometry.cpp +src/http/httpthread.cpp +src/http/ipagehandler.cpp +src/http/pages/homepage.cpp src/nntp/nntpconnection.cpp src/nntp/nntplistener.cpp src/nntp/uwildmat.cpp @@ -74,8 +77,8 @@ ENDIF(WIN32) FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s) FIND_LIBRARY(TINYXML_LIBRARY NAMES tinyxml tinyxml_s) -#FIND_LIBRARY(ZTHREADS_LIBRARY NAMES zthread ZThread zthread_s) FIND_LIBRARY(PTHREADS_LIBRARY NAMES pthread pthreads pthreadvc2) +FIND_LIBRARY(SHTTPD_LIBRARY NAMES shttpd) IF(SQLITE3_LIBRARY) TARGET_LINK_LIBRARIES(fms ${SQLITE3_LIBRARY}) @@ -98,14 +101,23 @@ ELSE(TINYXML_LIBRARY) INCLUDE_DIRECTORIES(libs/tinyxml) ENDIF(TINYXML_LIBRARY) -#IF(ZTHREADS_LIBRARY) -# TARGET_LINK_LIBRARIES(fms ${ZTHREADS_LIBRARY}) -#ELSE(ZTHREADS_LIBRARY) -# MESSAGE(FATAL_ERROR "Could not find ZThreads library. You must set the location manually.") -#ENDIF(ZTHREADS_LIBRARY) - IF(PTHREADS_LIBRARY) TARGET_LINK_LIBRARIES(fms ${PTHREADS_LIBRARY}) ELSE(PTHREADS_LIBRARY) MESSAGE(FATAL ERROR "Could not find pthreads library. You must set the location manually.") ENDIF(PTHREADS_LIBRARY) + +IF(SHTTPD_LIBRARY) + TARGET_LINK_LIBRARIES(fms ${SHTTPD_LIBRARY}) +ELSE(SHTTPD_LIBRARY) + MESSAGE(STATUS "Could not find shttpd library. Will compile from included source.") + ADD_DEFINITIONS(-DEMBEDDED -DNO_GUI) + INCLUDE_DIRECTORIES(libs/shttpd/include) + IF(WIN32) + SET(SHTTPD_PLATFORM_SRC libs/shttpd/compat_win32.c) + ELSE(WIN32) + SET(SHTTPD_PLATFORM_SRC libs/shttpd/compat_unix.c) + ENDIF(WIN32) + 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) + TARGET_LINK_LIBRARIES(fms shttpd) +ENDIF(SHTTPD_LIBRARY)