X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=CMakeLists.txt;h=be285e20da89683b76bb58f9695defcac1392969;hp=8cace6011449c86149ccf9a459bc8807c561610c;hb=964f55fd550fc711c0320ce6a24ad713040695d0;hpb=9048d8e482c91960265f29c2b5b3112f2a52f3d8 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cace60..be285e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,12 +2,16 @@ PROJECT(fms) SET(FMS_SRC src/base64.cpp +src/board.cpp +src/boardlist.cpp src/commandthread.cpp src/datetime.cpp +src/global.cpp src/hex.cpp -src/identitytestglobal.cpp src/logfile.cpp src/main.cpp +src/message.cpp +src/messagelist.cpp src/option.cpp src/socketdefines.cpp src/stringfunctions.cpp @@ -28,6 +32,12 @@ src/freenet/introductionpuzzleinserter.cpp src/freenet/introductionpuzzleremover.cpp src/freenet/introductionpuzzlerequester.cpp src/freenet/introductionpuzzlexml.cpp +src/freenet/messageinserter.cpp +src/freenet/messagelistinserter.cpp +src/freenet/messagelistrequester.cpp +src/freenet/messagelistxml.cpp +src/freenet/messagerequester.cpp +src/freenet/messagexml.cpp src/freenet/trustlistinserter.cpp src/freenet/trustlistrequester.cpp src/freenet/trustlistxml.cpp @@ -36,27 +46,54 @@ 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/nntp/nntpconnection.cpp +src/nntp/nntplistener.cpp +src/nntp/uwildmat.cpp +src/nntp/mime/Mime.cpp +src/nntp/mime/MimeChar.cpp +src/nntp/mime/MimeCode.cpp +src/nntp/mime/MimeType.cpp src/xyssl/sha1.c ) ADD_DEFINITIONS(-DTIXML_USE_STL) +IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + ADD_DEFINITIONS(-fpermissive) +ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + ADD_EXECUTABLE(fms ${FMS_SRC}) -FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s) -FIND_LIBRARY(TINYXML_LIBRARY NAMES tinyxml tinyxml_s) -FIND_LIBRARY(ZTHREADS_LIBRARY NAMES zthread zthread_s) +INCLUDE_DIRECTORIES(libs/sqlite3 libs/tinyxml) IF(WIN32) TARGET_LINK_LIBRARIES(fms ws2_32) 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) + IF(SQLITE3_LIBRARY) TARGET_LINK_LIBRARIES(fms ${SQLITE3_LIBRARY}) +ELSE(SQLITE3_LIBRARY) + MESSAGE(STATUS "Could not find system SQLite library. Will compile from included source.") + ADD_LIBRARY(sqlite3 libs/sqlite3/sqlite3.c) + TARGET_LINK_LIBRARIES(fms sqlite3) +ADD_LIBRARY(tinyxml libs/tinyxml/tinystr.cpp libs/tinyxml/tinyxml.cpp libs/tinyxml/tinyxmlerror.cpp libs/tinyxml/tinyxmlparser.cpp) + ENDIF(SQLITE3_LIBRARY) + IF(TINYXML_LIBRARY) TARGET_LINK_LIBRARIES(fms ${TINYXML_LIBRARY}) +ELSE(TINYXML_LIBRARY) + MESSAGE(STATUS "Could not find system TinyXML library. Will compile from included source.") + ADD_LIBRARY(tinyxml libs/tinyxml/tinystr.cpp libs/tinyxml/tinyxml.cpp libs/tinyxml/tinyxmlerror.cpp libs/tinyxml/tinyxmlparser.cpp) + TARGET_LINK_LIBRARIES(fms 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)