projects
/
fms.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version 0.2.2
[fms.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
5f976ac
..
00b85c5
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-1,5
+1,7
@@
PROJECT(fms)
\r
\r
PROJECT(fms)
\r
\r
+OPTION(USE_BUNDLED_SQLITE "Use the bundled SQLite3 library" OFF)
\r
+
\r
SET(FMS_SRC
\r
src/base64.cpp
\r
src/board.cpp
\r
SET(FMS_SRC
\r
src/base64.cpp
\r
src/board.cpp
\r
@@
-100,7
+102,7
@@
ADD_EXECUTABLE(fms ${FMS_SRC} ${FMS_PLATFORM_SRC})
# link dl - For SQLite3 and shttpd - not for FreeBSD
\r
IF(CMAKE_COMPILER_IS_GNUCC)
\r
IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
# link dl - For SQLite3 and shttpd - not for FreeBSD
\r
IF(CMAKE_COMPILER_IS_GNUCC)
\r
IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
- ELSE
IF
(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
+ ELSE(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
TARGET_LINK_LIBRARIES(fms dl)
\r
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
ENDIF(CMAKE_COMPILER_IS_GNUCC)
\r
@@
-108,7
+110,7
@@
ENDIF(CMAKE_COMPILER_IS_GNUCC)
# add -lcompat only for FreeBSD
\r
IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
IF(CMAKE_COMPILER_IS_GNUCXX)
\r
# add -lcompat only for FreeBSD
\r
IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
IF(CMAKE_COMPILER_IS_GNUCXX)
\r
-
ADD_DEFINITIONS(-l
compat)
\r
+
TARGET_LINK_LIBRARIES(fms
compat)
\r
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
\r
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
\r
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
\r
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
\r
\r
@@
-119,18
+121,23
@@
ENDIF(WIN32)
\r
# add -lxnet and -lsocket on solaris
\r
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
\r
\r
# add -lxnet and -lsocket on solaris
\r
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
\r
- ADD_DEFINITIONS(-lxnet -lsocket)
\r
+ TARGET_LINK_LIBRARIES(fms xnet)
\r
+ TARGET_LINK_LIBRARIES(fms socket)
\r
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
\r
\r
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
\r
\r
-FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s)
\r
+IF(NOT USE_BUNDLED_SQLITE)
\r
+ FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_s)
\r
+ENDIF(NOT USE_BUNDLED_SQLITE)
\r
FIND_LIBRARY(TINYXML_LIBRARY NAMES tinyxml tinyxml_s)
\r
FIND_LIBRARY(PTHREADS_LIBRARY NAMES pthread pthreads pthreadvc2)
\r
FIND_LIBRARY(TINYXML_LIBRARY NAMES tinyxml tinyxml_s)
\r
FIND_LIBRARY(PTHREADS_LIBRARY NAMES pthread pthreads pthreadvc2)
\r
-FIND_LIBRARY(SHTTPD_LIBRARY NAMES shttpd)
\r
+FIND_LIBRARY(SHTTPD_LIBRARY NAMES shttpd
shttpd_s
)
\r
\r
IF(SQLITE3_LIBRARY)
\r
TARGET_LINK_LIBRARIES(fms ${SQLITE3_LIBRARY})
\r
ELSE(SQLITE3_LIBRARY)
\r
\r
IF(SQLITE3_LIBRARY)
\r
TARGET_LINK_LIBRARIES(fms ${SQLITE3_LIBRARY})
\r
ELSE(SQLITE3_LIBRARY)
\r
- MESSAGE(STATUS "Could not find system SQLite library. Will compile from included source.")
\r
+ IF(NOT USE_BUNDLED_SQLITE)
\r
+ MESSAGE(STATUS "Could not find system SQLite library. Will compile from included source.")
\r
+ ENDIF(NOT USE_BUNDLED_SQLITE)
\r
ADD_LIBRARY(sqlite3 libs/sqlite3/sqlite3.c)
\r
TARGET_LINK_LIBRARIES(fms sqlite3)
\r
INCLUDE_DIRECTORIES(libs/sqlite3)
\r
ADD_LIBRARY(sqlite3 libs/sqlite3/sqlite3.c)
\r
TARGET_LINK_LIBRARIES(fms sqlite3)
\r
INCLUDE_DIRECTORIES(libs/sqlite3)
\r
@@
-163,6
+170,6
@@
ELSE(SHTTPD_LIBRARY)
ELSE(WIN32)
\r
SET(SHTTPD_PLATFORM_SRC libs/shttpd/compat_unix.c)
\r
ENDIF(WIN32)
\r
ELSE(WIN32)
\r
SET(SHTTPD_PLATFORM_SRC libs/shttpd/compat_unix.c)
\r
ENDIF(WIN32)
\r
- ADD_LIBRARY(shttpd ${SHTTPD_PLATFORM_SRC} libs/shttpd/auth.c libs/shttpd/cgi.c libs/shttpd/config.c libs/shttpd/io_cgi.c libs/shttpd/io_dir.c libs/shttpd/io_emb.c libs/shttpd/io_file.c libs/shttpd/io_socket.c libs/shttpd/io_ssi.c libs/shttpd/io_ssl.c libs/shttpd/log.c libs/shttpd/md5.c libs/shttpd/
mime_type.c libs/shttpd/
shttpd.c libs/shttpd/string.c)
\r
+ ADD_LIBRARY(shttpd ${SHTTPD_PLATFORM_SRC} libs/shttpd/auth.c libs/shttpd/cgi.c libs/shttpd/config.c libs/shttpd/io_cgi.c libs/shttpd/io_dir.c libs/shttpd/io_emb.c libs/shttpd/io_file.c libs/shttpd/io_socket.c libs/shttpd/io_ssi.c libs/shttpd/io_ssl.c libs/shttpd/log.c libs/shttpd/md5.c libs/shttpd/shttpd.c libs/shttpd/string.c)
\r
TARGET_LINK_LIBRARIES(fms shttpd)
\r
ENDIF(SHTTPD_LIBRARY)
\r
TARGET_LINK_LIBRARIES(fms shttpd)
\r
ENDIF(SHTTPD_LIBRARY)
\r