X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=CMakeLists.txt;h=88af084ffb3dfdc0ea0b88344699e1574378fc3b;hp=6412e14c0b325f0cfa50735b0e3107a6f3f32200;hb=HEAD;hpb=4e96d123460d6363cf7274e36bd9357768eb86ad diff --git a/CMakeLists.txt b/CMakeLists.txt index 6412e14..88af084 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ ENDIF(APPLE) OPTION(DO_CHARSET_CONVERSION "Do charset conversion on sent messages to UTF-8. This requires libiconv." ON) OPTION(I_HAVE_READ_THE_README "I have fully read and understood the readme.txt." OFF) OPTION(ALTERNATE_CAPTCHA "Use alternate captcha. This requires the FreeImage library." OFF) +OPTION(QUERY_LOG "Log all database queries made by FMS." OFF) +OPTION(FROST_SUPPORT "Compile with support for downloading Frost messages." ON) SET(FMS_SRC src/base64.cpp @@ -99,6 +101,7 @@ src/http/pages/peertrustpage.cpp src/http/pages/recentlyaddedpage.cpp src/http/pages/showcaptchapage.cpp src/http/pages/showimagepage.cpp +src/http/pages/showpendingmessagepage.cpp src/http/pages/versioninfopage.cpp src/nntp/extensiontrust.cpp src/nntp/nntpconnection.cpp @@ -131,6 +134,14 @@ ELSE(ALTERNATE_CAPTCHA) 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.") ENDIF(ALTERNATE_CAPTCHA) +IF(FROST_SUPPORT) +# TODO - add source files for frost support + SET(FMS_SRC ${FMS_SRC} + src/freenet/frostidentity.cpp + src/freenet/frostmessagerequester.cpp + src/freenet/frostmessagexml.cpp) +ENDIF(FROST_SUPPORT) + # Get a relative list of include files. FILE(GLOB_RECURSE FMS_INC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h) @@ -183,6 +194,7 @@ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") IF(NOT USE_BUNDLED_SQLITE) FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s) ENDIF(NOT USE_BUNDLED_SQLITE) + FIND_LIBRARY(POCO_FOUNDATION_LIBRARY NAMES PocoFoundation PocoFoundationmt) FIND_LIBRARY(POCO_NET_LIBRARY NAMES PocoNet PocoNetmt) FIND_LIBRARY(POCO_UTIL_LIBRARY NAMES PocoUtil PocoUtilmt) @@ -270,7 +282,38 @@ IF(ALTERNATE_CAPTCHA) ENDIF(FREEIMAGE_LIBRARY) ENDIF(ALTERNATE_CAPTCHA) +IF(FROST_SUPPORT) + FIND_LIBRARY(TOMCRYPT_LIBRARY NAMES tomcrypt libtomcrypt) + FIND_LIBRARY(TOMMATH_LIBRARY NAMES tommath libtommath) + + IF(TOMMATH_LIBRARY) + TARGET_LINK_LIBRARIES(fms ${TOMMATH_LIBRARY}) + ELSE(TOMMATH_LIBRARY) + #ADD_LIBRARY(tommath ${LIBTOMMATH_SRC}) + ADD_SUBDIRECTORY(libs/libtommath) + TARGET_LINK_LIBRARIES(fms tommath) + INCLUDE_DIRECTORIES(libs/libtommath) + ENDIF(TOMMATH_LIBRARY) + + IF(TOMCRYPT_LIBRARY) + TARGET_LINK_LIBRARIES(fms ${TOMCRYPT_LIBRARY}) + ELSE(TOMCRYPT_LIBRARY) + #ADD_DEFINITIONS(-DLTC_NO_ASM) + #ADD_LIBRARY(tomcrypt ${LIBTOMCRYPT_SRC}) + ADD_SUBDIRECTORY(libs/libtomcrypt) + TARGET_LINK_LIBRARIES(fms tomcrypt) + INCLUDE_DIRECTORIES(libs/libtomcrypt/headers) + ENDIF(TOMCRYPT_LIBRARY) + + ADD_DEFINITIONS(-DFROST_SUPPORT) + +ENDIF(FROST_SUPPORT) + # FreeBSD won't find Poco include files without this IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") INCLUDE_DIRECTORIES(AFTER /usr/local/include) ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + +IF(QUERY_LOG) + ADD_DEFINITIONS(-DQUERY_LOG) +ENDIF(QUERY_LOG)