summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunfeng Dong <junfeng.dong@intel.com>2013-03-25 18:20:10 +0800
committerlifang <fangx.li@intel.com>2013-03-29 05:28:58 +0800
commitfe9d9997b51180401118da8d09e911abc1495e9c (patch)
treec7d5b922f5df2bf6fe01a99d4f38fcee533d51f3
parenta36ac34b57347b7b92acbc910c35a75e7a6fca29 (diff)
downloadhaptic-tizen_2.1.tar.gz
haptic-tizen_2.1.tar.bz2
haptic-tizen_2.1.zip
- Fix hardcoding path. - Use %cmake to set default paths. Change-Id: Ibbf81aa088e1b5203f1f91e884fe7cb3d4a812fb
-rwxr-xr-xCMakeLists.txt6
-rw-r--r--capi-system-haptic.pc.in2
-rw-r--r--packaging/capi-system-haptic.spec2
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}