summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoon.c.baek <joon.c.baek@samsung.com>2015-05-26 23:18:32 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2015-05-26 23:18:32 -0700
commit4b6517183bf0e21b38d31ddcab22473ca4d98c37 (patch)
tree1dfbba22c49a8d84765e206942b58dd5183d21ee
parent8371daddf4d7d44071492e2bc7b5cd4b020d7359 (diff)
parent9ef1b34b62170d88ab525f706af826fc16abe80b (diff)
downloadttrace-4b6517183bf0e21b38d31ddcab22473ca4d98c37.tar.gz
ttrace-4b6517183bf0e21b38d31ddcab22473ca4d98c37.tar.bz2
ttrace-4b6517183bf0e21b38d31ddcab22473ca4d98c37.zip
-rwxr-xr-xCMakeLists.txt10
-rw-r--r--atrace.pc.in2
-rwxr-xr-xpackaging/ttrace.spec2
-rw-r--r--ttrace.pc.in2
4 files changed, 7 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0155673..195375f 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,8 +3,6 @@ PROJECT(ttrace C 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")
@@ -43,10 +41,10 @@ TARGET_LINK_LIBRARIES(${TTRACE} ${pkg_ttrace_LDFLAGS} "-ldl")
CONFIGURE_FILE(${TTRACE}.pc.in ${TTRACE}.pc @ONLY)
-INSTALL(TARGETS ${TTRACE} DESTINATION lib COMPONENT RuntimeLibraries)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TTRACE}.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${TTRACE} DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TTRACE}.pc DESTINATION ${LIBDIR}/pkgconfig)
FOREACH(hfile ${HEADERS_ttrace})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include)
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION ${INCLUDEDIR})
ENDFOREACH(hfile)
#################################################################
@@ -73,4 +71,4 @@ TARGET_LINK_LIBRARIES(${ATRACE} ${pkg_atrace_LDFLAGS} "-ldl")
CONFIGURE_FILE(${ATRACE}.pc.in ${ATRACE}.pc @ONLY)
INSTALL(TARGETS ${ATRACE} DESTINATION bin)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ATRACE}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ATRACE}.pc DESTINATION ${LIBDIR}/pkgconfig)
diff --git a/atrace.pc.in b/atrace.pc.in
index 4edb568..422aeba 100644
--- a/atrace.pc.in
+++ b/atrace.pc.in
@@ -2,7 +2,7 @@
prefix=@PREFIX@
exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
+libdir=@LIB_INSTALL_DIR@
includedir=@INCLUDEDIR@
Name: atrace
diff --git a/packaging/ttrace.spec b/packaging/ttrace.spec
index ecd30ff..ea77215 100755
--- a/packaging/ttrace.spec
+++ b/packaging/ttrace.spec
@@ -28,7 +28,7 @@ T-trace library devel
%build
export CFLAGS="$CFLAGS -g -Wall -std=gnu99"
export CXXFLAGS="$CXXFLAGS -std=c++0x -fPIE -pie"
-cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} .
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_PKGTYPE=rpm -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
make %{?jobs:-j%jobs}
%install
diff --git a/ttrace.pc.in b/ttrace.pc.in
index 11ae6a9..709639e 100644
--- a/ttrace.pc.in
+++ b/ttrace.pc.in
@@ -2,7 +2,7 @@
prefix=@PREFIX@
exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
+libdir=@LIB_INSTALL_DIR@
includedir=@INCLUDEDIR@
Name: ttrace