1 |
project(SMSDAEMON CXX) |
PROJECT(SMSDAEMON CXX) |
2 |
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
3 |
|
|
4 |
cmake_minimum_required(VERSION 2.6) |
#SET(CMAKE_VERBOSE_MAKEFILE 1) |
5 |
|
SET(CMAKE_BUILD_TYPE DEBUG) |
6 |
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -Wall") |
7 |
|
|
|
#set(CMAKE_VERBOSE_MAKEFILE 1) |
|
|
set(CMAKE_BUILD_TYPE DEBUG) |
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -Wall") |
|
8 |
|
|
|
add_subdirectory(plugins) |
|
|
add_subdirectory(tasks) |
|
|
add_subdirectory(serialport) |
|
9 |
|
|
10 |
link_directories( ${SMSDAEMON_BINARY_DIR} ${SMSDAEMON_BINARY_DIR}/plugins) |
FIND_PACKAGE(CURL) |
11 |
include_directories( ${SMSDAEMON_SOURCE_DIR} ${SMSDAEMON_SOURCE_DIR}/plugins ${SMSDAEMON_SOURCE_DIR}/serialport) |
FIND_PACKAGE(EXPAT) |
12 |
|
|
13 |
|
IF(CURL_FOUND) |
14 |
|
ELSE(CURL_FOUND) |
15 |
|
MESSAGE(FATAL_ERROR, "Could not find libCURL") |
16 |
|
RETURN() |
17 |
|
ENDIF(CURL_FOUND) |
18 |
|
|
19 |
|
ADD_SUBDIRECTORY(plugins) |
20 |
|
ADD_SUBDIRECTORY(tasks) |
21 |
|
ADD_SUBDIRECTORY(serialport) |
22 |
|
ADD_SUBDIRECTORY(embedded-http) |
23 |
|
|
24 |
|
LINK_DIRECTORIES ( ${SMSDAEMON_BINARY_DIR} ) |
25 |
|
INCLUDE_DIRECTORIES( ${SMSDAEMON_SOURCE_DIR}/ ) |
26 |
|
|
27 |
EXECUTE_PROCESS( |
EXECUTE_PROCESS( |
28 |
COMMAND "./genversion.sh" |
COMMAND "./genversion.sh" |
31 |
) |
) |
32 |
|
|
33 |
|
|
34 |
|
ADD_LIBRARY(smsdaemoncore SHARED |
35 |
|
ModemTransceiver.cpp Sms.cpp Common.cpp Util.cpp TaskManager.cpp daemon.cpp kbhit.cpp |
36 |
|
PluginManager.cpp Plugin.cpp SmsPdu.cpp SmsDaemon.cpp |
37 |
|
Task.cpp Spooler.cpp Value.cpp ConfigFile.cpp DebugTransceiver.cpp |
38 |
|
SmsToolTransceiver.cpp Logger.cpp HttpClient.cpp ProxyTransceiver.cpp ProxyPlugin.cpp |
39 |
|
AccessManager.cpp |
40 |
|
) |
41 |
|
|
42 |
add_library(smsdaemoncore SHARED GsmModem.cpp Sms.cpp common.cpp util.cpp TaskManager.cpp daemon.cpp kbhit.cpp PluginManager.cpp Plugin.cpp SmsPdu.cpp SmsDaemon.cpp Task.cpp) |
ADD_EXECUTABLE(smsdaemon main.cpp) |
43 |
|
TARGET_LINK_LIBRARIES(smsdaemon smsdaemoncore smsplugins smstasks smshttp serialport curl expat dl pthread) |
|
add_executable(smsdaemon main.cpp) |
|
|
|
|
|
target_link_libraries(smsdaemon smsdaemoncore plugins tasks serialport) |
|
44 |
|
|
45 |
|
ADD_EXECUTABLE(tester tester.cpp) |
46 |
|
TARGET_LINK_LIBRARIES(tester smsdaemoncore smsplugins smstasks smshttp serialport curl expat) |
47 |
|
|
48 |
add_executable(tester tester.cpp) |
ADD_EXECUTABLE(smsqueue smsqueue.cpp Util.cpp Spooler.cpp) |
|
target_link_libraries(tester smsdaemoncore plugins tasks serialport) |
|
49 |
|
|
50 |
INSTALL (TARGETS smsdaemon smsdaemoncore |
INSTALL (TARGETS smsdaemon smsdaemoncore smsqueue |
51 |
RUNTIME DESTINATION bin |
RUNTIME DESTINATION bin |
52 |
LIBRARY DESTINATION lib |
LIBRARY DESTINATION lib |
53 |
) |
) |