From 5472b82275f07e8638480a3c45cca2ee4ef782f6 Mon Sep 17 00:00:00 2001 From: Junfeng Dong Date: Mon, 8 Apr 2013 16:07:42 +0800 Subject: [PATCH] Fix for 64 bit compatibility. - Fix hardcoding path. - Use %cmake to set default paths. Change-Id: I415fd18fed6e2e6e05781178b32d9c99da3b849b --- CMakeLists.txt | 6 +++--- capi-location-poi.pc.in | 2 +- packaging/capi-location-poi.spec | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8496e40..e382d12 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,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}) @@ -42,7 +42,7 @@ SET_TARGET_PROPERTIES(${fw_name} TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS}) -INSTALL(TARGETS ${fw_name} DESTINATION lib) +INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR}) INSTALL( DIRECTORY ${INC_DIR}/ DESTINATION include/location FILES_MATCHING @@ -59,7 +59,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-location-poi.pc.in b/capi-location-poi.pc.in index 150e613..241551f 100755 --- a/capi-location-poi.pc.in +++ b/capi-location-poi.pc.in @@ -3,7 +3,7 @@ prefix=@PREFIX@ exec_prefix=/usr -libdir=/usr/lib +libdir=@LIB_INSTALL_DIR@ includedir=/usr/include/location Name: @PC_NAME@ diff --git a/packaging/capi-location-poi.spec b/packaging/capi-location-poi.spec index e1746d9..2eb5724 100755 --- a/packaging/capi-location-poi.spec +++ b/packaging/capi-location-poi.spec @@ -31,7 +31,7 @@ Requires: %{name} = %{version}-%{release} %build 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} -- 2.7.4