Re-package sensor-hal to sensor-plugins-tm1
[platform/adaptation/tm1/sensor-hal-tm1.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2 project(sensor-plugins CXX)
3 include(GNUInstallDirs)
4
5 # Common Options
6 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -omit-frame-pointer -std=gnu++0x")
7 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections")
8 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-section -Wl,--print-gc-section")
9 MESSAGE("FLAGS: ${CMAKE_CXX_FLAGS}")
10 MESSAGE("FLAGS: ${CMAKE_EXE_LINKER_FLAGS}")
11
12 add_definitions(-DUSE_DLOG_LOG)
13 add_definitions(-DLIBDIR="${CMAKE_INSTALL_LIBDIR}")
14
15 # Internal Debugging Options
16 #add_definitions(-Wall -g -D_DEBUG)
17
18 # Installing files
19 CONFIGURE_FILE(sensors.xml.in sensors.xml @ONLY)
20
21 INSTALL(FILES sensors.xml DESTINATION etc)
22
23 # Sub-directory
24 add_subdirectory(src)