summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 6ca88fbcbb3218393a6a62168638653576e7a700 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

INCLUDE(BuildFlags.cmake)

SET(CMAKE_SKIP_BUILD_RPATH TRUE)

SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(PLUGINDIR "${LIB_INSTALL_DIR}/${PROJECT_NAME}")

# get library version from debian/changelog
get_version(debian/changelog VERSION VERSION_MAJOR)
MESSAGE(STATUS "Package version is ${VERSION} (major: ${VERSION_MAJOR}) from changelog")

# pass macro defition to source files
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DPLUGINDIR=\"${PLUGINDIR}\"")
ADD_DEFINITIONS("-Wno-unused-but-set-variable")
# log tag integration
ADD_DEFINITIONS("-DCOMPONENT_TAG=SYSTEM")
ADD_DEFINITIONS("-DSYNC_AGENT_LOG")
ADD_DEFINITIONS("-DLOG_TAG=\"SYNC_AGENT\"")

# include source files
ADD_SUBDIRECTORY(src/framework)
ADD_SUBDIRECTORY(src/fw-plugins)