ENDIF(APPLE)\r
OPTION(DO_CHARSET_CONVERSION "Do charset conversion on sent messages to UTF-8. This requires libiconv." ON)\r
OPTION(I_HAVE_READ_THE_README "I have fully read and understood the readme.txt." OFF)\r
+OPTION(ALTERNATE_CAPTCHA "Use alternate captcha. This requires the FreeImage library." OFF)\r
\r
-SET(FMS_SRC \r
+SET(FMS_SRC\r
src/base64.cpp\r
src/bitmapvalidator.cpp\r
src/board.cpp\r
src/boardlist.cpp\r
-src/db\r
src/dbconversions.cpp\r
src/dbmaintenancethread.cpp\r
src/dbsetup.cpp\r
src/fmsapp.cpp\r
-src/freenet\r
src/global.cpp\r
src/hex.cpp\r
-src/http\r
src/ipaddressacl.cpp\r
src/localidentity.cpp\r
src/main.cpp\r
src/message.cpp\r
src/messagelist.cpp\r
-src/nntp\r
+src/messagethread.cpp\r
src/option.cpp\r
src/optionssetup.cpp\r
src/socketdefines.cpp\r
src/stringfunctions.cpp\r
-src/threadwrapper\r
+src/threadbuilder.cpp\r
src/db/sqlite3db.cpp\r
src/db/sqlite3recordset.cpp\r
src/db/sqlite3statement.cpp\r
src/freenet/boardlistinserter.cpp\r
src/freenet/boardlistrequester.cpp\r
src/freenet/boardlistxml.cpp\r
-src/freenet/captcha\r
src/freenet/fcpv2.cpp\r
src/freenet/fileinserter.cpp\r
src/freenet/fmsversionrequester.cpp\r
src/freenet/trustlistrequester.cpp\r
src/freenet/trustlistxml.cpp\r
src/freenet/unkeyedidcreator.cpp\r
-src/freenet/captcha/easybmp\r
src/freenet/captcha/simplecaptcha.cpp\r
src/freenet/captcha/easybmp/EasyBMP.cpp\r
src/freenet/captcha/easybmp/EasyBMP_Font.cpp\r
src/http/identityexportxml.cpp\r
src/http/ipagehandler.cpp\r
src/http/multipartparser.cpp\r
-src/http/pages\r
src/http/pages/addpeerpage.cpp\r
src/http/pages/announceidentitypage.cpp\r
src/http/pages/boardspage.cpp\r
+src/http/pages/browseboardspage.cpp\r
+src/http/pages/browsemessagespage.cpp\r
src/http/pages/confirmpage.cpp\r
src/http/pages/controlboardpage.cpp\r
src/http/pages/createidentitypage.cpp\r
src/http/pages/execquerypage.cpp\r
+src/http/pages/forumcreatepostpage.cpp\r
+src/http/pages/forummainpage.cpp\r
+src/http/pages/forumthreadspage.cpp\r
+src/http/pages/forumviewthreadpage.cpp\r
src/http/pages/homepage.cpp\r
src/http/pages/insertedfilespage.cpp\r
src/http/pages/localidentitiespage.cpp\r
src/http/pages/peertrustpage.cpp\r
src/http/pages/recentlyaddedpage.cpp\r
src/http/pages/showcaptchapage.cpp\r
+src/http/pages/showimagepage.cpp\r
src/http/pages/versioninfopage.cpp\r
src/nntp/extensiontrust.cpp\r
-src/nntp/mime\r
src/nntp/nntpconnection.cpp\r
src/nntp/nntplistener.cpp\r
src/nntp/uwildmat.cpp\r
SET(FMS_SRC ${FMS_SRC} src/charsetconverter.cpp)\r
ENDIF(DO_CHARSET_CONVERSION)\r
\r
+IF(ALTERNATE_CAPTCHA)\r
+ SET(FMS_SRC ${FMS_SRC} \r
+ src/freenet/captcha/alternatecaptcha1.cpp\r
+ src/freenet/captcha/alternatecaptcha2.cpp\r
+ src/freenet/captcha/alternatecaptchafonts.cpp\r
+ src/freenet/captcha/freeimage/bitmap.cpp\r
+ src/freenet/captcha/freeimage/font.cpp)\r
+ELSE(ALTERNATE_CAPTCHA)\r
+ MESSAGE(STATUS "You are using the old captcha generator. Add a -D ALTERNATE_CAPTCHA=ON to the command line to use the alternate captcha generator.")\r
+ENDIF(ALTERNATE_CAPTCHA)\r
+\r
IF(NOT I_HAVE_READ_THE_README)\r
MESSAGE(FATAL_ERROR "You must fully read the readme.txt before continuing.")\r
ENDIF(NOT I_HAVE_READ_THE_README)\r
FIND_LIBRARY(POCO_XML_LIBRARY NAMES PocoXML PocoXMLmt)\r
FIND_LIBRARY(PTHREADS_LIBRARY NAMES pthread pthreads pthreadvc2)\r
FIND_LIBRARY(ICONV_LIBRARY NAMES iconv iconv_s libiconv libiconv_s)\r
+IF(ALTERNATE_CAPTCHA)\r
+ FIND_FILE(FREEIMAGE_LIBRARY NAMES libfreeimage.a PATHS /usr/lib/)\r
+ IF(NOT FREEIMAGE_LIBRARY)\r
+ FIND_LIBRARY(FREEIMAGE_LIBRARY NAMES FreeImage libFreeImage libfreeimage freeimage)\r
+ ENDIF(NOT FREEIMAGE_LIBRARY)\r
+ENDIF(ALTERNATE_CAPTCHA)\r
\r
IF(POCO_FOUNDATION_LIBRARY)\r
TARGET_LINK_LIBRARIES(fms ${POCO_FOUNDATION_LIBRARY})\r
ENDIF(NOT WIN32)\r
\r
IF(SQLITE3_LIBRARY)\r
+ MESSAGE(STATUS "Linking against system SQLite3 library.")\r
TARGET_LINK_LIBRARIES(fms ${SQLITE3_LIBRARY})\r
ELSE(SQLITE3_LIBRARY)\r
IF(NOT USE_BUNDLED_SQLITE)\r
ENDIF(ICONV_LIBRARY)\r
ENDIF(DO_CHARSET_CONVERSION)\r
\r
+IF(ALTERNATE_CAPTCHA)\r
+ IF(FREEIMAGE_LIBRARY)\r
+ TARGET_LINK_LIBRARIES(fms ${FREEIMAGE_LIBRARY})\r
+ ADD_DEFINITIONS("-DALTERNATE_CAPTCHA")\r
+ ELSE(FREEIMAGE_LIBRARY)\r
+ MESSAGE(FATAL_ERROR "Could not find the FreeImage library. Set the location manually, or turn off the alternate captchas.")\r
+ ENDIF(FREEIMAGE_LIBRARY)\r
+ENDIF(ALTERNATE_CAPTCHA)\r
+\r
# FreeBSD won't find Poco include files without this\r
IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")\r
INCLUDE_DIRECTORIES(AFTER /usr/local/include)\r