summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunfeng Dong <junfeng.dong@intel.com>2013-03-25 11:43:12 (GMT)
committerlifang <fangx.li@intel.com>2013-03-28 21:20:58 (GMT)
commitdf14a3d94e2ec1681d1656dc4263791b24b3870a (patch)
treeef34aecb70cc30fd5381f98c0f8c8223a17f0d32
parentfe586d36916373dd4cd5b3e90207cc5f26c64091 (diff)
downloadlibslp-sensor-df14a3d94e2ec1681d1656dc4263791b24b3870a.zip
libslp-sensor-df14a3d94e2ec1681d1656dc4263791b24b3870a.tar.gz
libslp-sensor-df14a3d94e2ec1681d1656dc4263791b24b3870a.tar.bz2
Fix for 64 bit compatibility.
- Use %cmake macro to set default path - Fix hard-coded library path - Fix the wrong cast between int and pointer. Change-Id: I4c0636e5e2e30f07f72aea9063de06d588bef901
-rw-r--r--CMakeLists.txt5
-rw-r--r--packaging/sensor.spec2
-rw-r--r--sensor.pc.in2
-rwxr-xr-xsrc/client.cpp2
4 files changed, 5 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7b1b63..37baba3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,6 @@ project(sensor CXX)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
SET(INCLUDEDIR "\${prefix}/include")
SET(VERSION_MAJOR 1)
SET(VERSION "${VERSION_MAJOR}.1.0")
@@ -45,7 +44,7 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
configure_file(${PROJECT_NAME}.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc @ONLY)
#install(DIRECTORY include/ DESTINATION include/ FILES_MATCHING PATTERN "*.h")
-install(TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT RuntimeLibraries)
+install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
install(FILES include/sensor.h DESTINATION include/sensor/)
install(FILES include/sensor_accel.h DESTINATION include/sensor/)
@@ -57,4 +56,4 @@ install(FILES include/sensor_gyro.h DESTINATION include/sensor/)
install(FILES include/sensor_barometer.h DESTINATION include/sensor/)
install(FILES include/sensor_fusion.h DESTINATION include/sensor/)
-install(FILES ${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+install(FILES ${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
diff --git a/packaging/sensor.spec b/packaging/sensor.spec
index b2d8916..d5aa129 100644
--- a/packaging/sensor.spec
+++ b/packaging/sensor.spec
@@ -33,7 +33,7 @@ Sensor framework client library (devel)
%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%cmake .
make %{?jobs:-j%jobs}
diff --git a/sensor.pc.in b/sensor.pc.in
index abac8eb..33168d0 100644
--- a/sensor.pc.in
+++ b/sensor.pc.in
@@ -2,7 +2,7 @@
prefix=@PREFIX@
exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
+libdir=@LIB_INSTALL_DIR@
includedir=@INCLUDEDIR@/sensor
Name: libsensor
diff --git a/src/client.cpp b/src/client.cpp
index f3fc816..004890b 100755
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -556,7 +556,7 @@ void lcd_off_set_wake_up(keynode_t *node, void *data)
static void sensor_changed_cb(keynode_t *node, void *data)
{
- int event_number = (int)(data);
+ signed long event_number = (signed long)(data);
unsigned int i = 0;
int val;
int cb_number = 0;