X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=CMakeLists.txt;h=9c0e66a8b2d6a20c11e09b4235cf7945e858b474;hb=befd91205eff729a182f66de15374a577a8718f7;hp=31359159a4062b05b26f92decd9aa061e5d8cc4d;hpb=b9c3763a932cebaa015a27fe111017f6f34dfbaa;p=fms.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 3135915..9c0e66a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,9 @@ src/uuidgenerator.cpp src/db/sqlite3db.cpp src/db/sqlite3recordset.cpp src/db/sqlite3statement.cpp +src/freenet/boardlistinserter.cpp +src/freenet/boardlistrequester.cpp +src/freenet/boardlistxml.cpp src/freenet/fcpv2.cpp src/freenet/freenetmasterthread.cpp src/freenet/freenetssk.cpp @@ -48,14 +51,19 @@ 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/identityexportxml.cpp src/http/ipagehandler.cpp src/http/pages/addpeerpage.cpp src/http/pages/announceidentitypage.cpp +src/http/pages/boardspage.cpp src/http/pages/controlboardpage.cpp src/http/pages/createidentitypage.cpp +src/http/pages/execquerypage.cpp src/http/pages/homepage.cpp src/http/pages/localidentitiespage.cpp src/http/pages/optionspage.cpp +src/http/pages/peerdetailspage.cpp +src/http/pages/peermaintenancepage.cpp src/http/pages/peertrustpage.cpp src/http/pages/showcaptchapage.cpp src/nntp/nntpconnection.cpp @@ -73,6 +81,12 @@ src/pthreadwrapper/threadedexecutor.cpp src/xyssl/sha1.c ) +IF(WIN32) + SET(FMS_PLATFORM_SRC src/fmsservice.cpp) +ELSE(WIN32) + SET(FMS_PLATFORM_SRC src/fmsdaemon.cpp) +ENDIF(WIN32) + ADD_DEFINITIONS(-DTIXML_USE_STL) # was for ZThreads @@ -81,17 +95,34 @@ ADD_DEFINITIONS(-DTIXML_USE_STL) # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") #ENDIF(CMAKE_COMPILER_IS_GNUCXX) -ADD_EXECUTABLE(fms ${FMS_SRC}) +ADD_EXECUTABLE(fms ${FMS_SRC} ${FMS_PLATFORM_SRC}) -# For SQLite3 and shttpd +# link dl - For SQLite3 and shttpd - not for FreeBSD IF(CMAKE_COMPILER_IS_GNUCC) - TARGET_LINK_LIBRARIES(fms dl) + IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + ELSE(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + TARGET_LINK_LIBRARIES(fms dl) + ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ENDIF(CMAKE_COMPILER_IS_GNUCC) +# add -lcompat only for FreeBSD +IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + IF(CMAKE_COMPILER_IS_GNUCXX) + TARGET_LINK_LIBRARIES(fms compat) + ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + +# link ws2_32 for Windows IF(WIN32) TARGET_LINK_LIBRARIES(fms ws2_32) ENDIF(WIN32) +# add -lxnet and -lsocket on solaris +IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + TARGET_LINK_LIBRARIES(fms xnet) + TARGET_LINK_LIBRARIES(fms socket) +ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s) FIND_LIBRARY(TINYXML_LIBRARY NAMES tinyxml tinyxml_s) FIND_LIBRARY(PTHREADS_LIBRARY NAMES pthread pthreads pthreadvc2)