From fe9d9997b51180401118da8d09e911abc1495e9c Mon Sep 17 00:00:00 2001 From: Junfeng Dong Date: Mon, 25 Mar 2013 18:20:10 +0800 Subject: Fix for 64 bit compatibility. - Fix hardcoding path. - Use %cmake to set default paths. Change-Id: Ibbf81aa088e1b5203f1f91e884fe7cb3d4a812fb --- CMakeLists.txt | 6 +++--- capi-system-haptic.pc.in | 2 +- packaging/capi-system-haptic.spec | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d14f49..b1b6fd6 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DTIZEN_DEBUG") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib") +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}") aux_source_directory(src SOURCES) ADD_LIBRARY(${fw_name} SHARED ${SOURCES}) @@ -43,7 +43,7 @@ SET_TARGET_PROPERTIES(${fw_name} CLEAN_DIRECT_OUTPUT 1 ) -INSTALL(TARGETS ${fw_name} DESTINATION lib) +INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR}) INSTALL( DIRECTORY ${INC_DIR}/ DESTINATION include/system FILES_MATCHING @@ -60,7 +60,7 @@ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc @ONLY ) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) #ADD_SUBDIRECTORY(test) diff --git a/capi-system-haptic.pc.in b/capi-system-haptic.pc.in index d0610b9..1d79ad0 100644 --- a/capi-system-haptic.pc.in +++ b/capi-system-haptic.pc.in @@ -3,7 +3,7 @@ prefix=@PREFIX@ exec_prefix=/usr -libdir=/usr/lib +libdir=@LIB_INSTALL_DIR@ includedir=/usr/include/system Name: @PC_NAME@ diff --git a/packaging/capi-system-haptic.spec b/packaging/capi-system-haptic.spec index 8fedb7e..1550bef 100644 --- a/packaging/capi-system-haptic.spec +++ b/packaging/capi-system-haptic.spec @@ -37,7 +37,7 @@ Requires: %{name} = %{version}-%{release} %build cp %{SOURCE1} . MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} make %{?jobs:-j%jobs} -- cgit v1.2.3