Merge "Adding AK8975 geo-sensor info in sensors.xml.in required by geo-plugin" into...
[platform/core/system/sensord.git] / src / orientation / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2 project(orientation CXX)
3
4 # to install pkgconfig setup file.
5 SET(EXEC_PREFIX "\${prefix}")
6 SET(LIBDIR "\${prefix}/lib")
7 SET(VERSION 1.0)
8
9 SET(SENSOR_NAME orientation_sensor)
10
11 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
12 include_directories(${CMAKE_SOURCE_DIR}/src/libsensord)
13 include_directories(${CMAKE_SOURCE_DIR}/src/sensor_fusion)
14
15 include(FindPkgConfig)
16 pkg_check_modules(rpkgs REQUIRED vconf)
17
18 set(PROJECT_MAJOR_VERSION "0")
19 set(PROJECT_MINOR_VERSION "0")
20 set(PROJECT_RELEASE_VERSION "1")
21 set(CMAKE_VERBOSE_MAKEFILE OFF)
22
23
24 FIND_PROGRAM(UNAME NAMES uname)
25 EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
26 IF("${ARCH}" MATCHES "^arm.*")
27         ADD_DEFINITIONS("-DTARGET -DHWREV_CHECK")
28         MESSAGE("add -DTARGET -DHWREV_CHECK")
29 ELSE("${ARCH}" MATCHES "^arm.*")
30         ADD_DEFINITIONS("-DSIMULATOR")
31         MESSAGE("add -DSIMULATOR")
32 ENDIF("${ARCH}" MATCHES "^arm.*")
33
34 add_definitions(-Wall -O3 -omit-frame-pointer)
35 #add_definitions(-Wall -g -D_DEBUG)
36 add_definitions(-DUSE_DLOG_LOG)
37 add_definitions(-Iinclude)
38
39 add_library(${SENSOR_NAME} SHARED
40                 orientation_sensor.cpp
41                 )
42
43 target_link_libraries(${SENSOR_NAME} ${rpkgs_LDFLAGS} ${GLES_LDFLAGS} "-lm")
44
45 install(TARGETS ${SENSOR_NAME} DESTINATION lib/sensord)