version 0.1.13
[fms.git] / CMakeLists.txt
index 455a73d..5f976ac 100644 (file)
@@ -55,6 +55,7 @@ src/http/identityexportxml.cpp
 src/http/ipagehandler.cpp\r
 src/http/pages/addpeerpage.cpp\r
 src/http/pages/announceidentitypage.cpp\r
+src/http/pages/boardspage.cpp\r
 src/http/pages/controlboardpage.cpp\r
 src/http/pages/createidentitypage.cpp\r
 src/http/pages/execquerypage.cpp\r
@@ -96,15 +97,31 @@ ADD_DEFINITIONS(-DTIXML_USE_STL)
 \r
 ADD_EXECUTABLE(fms ${FMS_SRC} ${FMS_PLATFORM_SRC})\r
 \r
-# For SQLite3 and shttpd\r
+# link dl - For SQLite3 and shttpd - not for FreeBSD\r
 IF(CMAKE_COMPILER_IS_GNUCC)\r
-       TARGET_LINK_LIBRARIES(fms dl)\r
+       IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")\r
+       ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")\r
+               TARGET_LINK_LIBRARIES(fms dl)\r
+       ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")\r
 ENDIF(CMAKE_COMPILER_IS_GNUCC)\r
 \r
+# add -lcompat only for FreeBSD\r
+IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")\r
+       IF(CMAKE_COMPILER_IS_GNUCXX)\r
+               ADD_DEFINITIONS(-lcompat)\r
+       ENDIF(CMAKE_COMPILER_IS_GNUCXX)\r
+ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")\r
+\r
+# link ws2_32 for Windows\r
 IF(WIN32)\r
        TARGET_LINK_LIBRARIES(fms ws2_32)\r
 ENDIF(WIN32)\r
 \r
+# add -lxnet and -lsocket on solaris\r
+IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")\r
+       ADD_DEFINITIONS(-lxnet -lsocket)\r
+ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")\r
+\r
 FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s)\r
 FIND_LIBRARY(TINYXML_LIBRARY NAMES tinyxml tinyxml_s)\r
 FIND_LIBRARY(PTHREADS_LIBRARY NAMES pthread pthreads pthreadvc2)\r