summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonYoung, Choi <wy80.choi@samsung.com>2012-02-15 10:57:18 +0900
committerWonYoung, Choi <wy80.choi@samsung.com>2012-02-15 11:06:43 +0900
commit60c664a61a96c6ad14b6d9f3f87cb2024e813da5 (patch)
tree8a7fb47a5dfdab6bc4453d6553aa77d51e1da25b
parent0bca8ec89e3efebddba84a11d8612485026a74ee (diff)
downloademail-60c664a61a96c6ad14b6d9f3f87cb2024e813da5.tar.gz
email-60c664a61a96c6ad14b6d9f3f87cb2024e813da5.tar.bz2
email-60c664a61a96c6ad14b6d9f3f87cb2024e813da5.zip
Add .so version information
-rwxr-xr-xCMakeLists.txt63
-rwxr-xr-xdebian/rules5
2 files changed, 39 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d17e945..3d71d97 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,13 +35,20 @@ ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
+SET_TARGET_PROPERTIES(${fw_name}
+ PROPERTIES
+ VERSION ${FULLVER}
+ SOVERSION ${MAJORVER}
+ CLEAN_DIRECT_OUTPUT 1
+)
+
INSTALL(TARGETS ${fw_name} DESTINATION lib)
INSTALL(
- DIRECTORY ${INC_DIR}/ DESTINATION include/messaging
- FILES_MATCHING
- PATTERN "*_private.h" EXCLUDE
- PATTERN "${INC_DIR}/*.h"
- )
+ DIRECTORY ${INC_DIR}/ DESTINATION include/messaging
+ FILES_MATCHING
+ PATTERN "*_private.h" EXCLUDE
+ PATTERN "${INC_DIR}/*.h"
+)
SET(PC_NAME ${fw_name})
SET(PC_REQUIRED ${dependents})
@@ -59,29 +66,29 @@ IF(UNIX)
ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
ADD_CUSTOM_COMMAND(
- DEPENDS clean
- COMMENT "distribution clean"
- COMMAND find
- ARGS .
- -not -name config.cmake -and \(
- -name tester.c -or
- -name Testing -or
- -name CMakeFiles -or
- -name cmake.depends -or
- -name cmake.check_depends -or
- -name CMakeCache.txt -or
- -name cmake.check_cache -or
- -name *.cmake -or
- -name Makefile -or
- -name core -or
- -name core.* -or
- -name gmon.out -or
- -name install_manifest.txt -or
- -name *.pc -or
- -name *~ \)
- | grep -v TC | xargs rm -rf
- TARGET distclean
- VERBATIM
+ DEPENDS clean
+ COMMENT "distribution clean"
+ COMMAND find
+ ARGS .
+ -not -name config.cmake -and \(
+ -name tester.c -or
+ -name Testing -or
+ -name CMakeFiles -or
+ -name cmake.depends -or
+ -name cmake.check_depends -or
+ -name CMakeCache.txt -or
+ -name cmake.check_cache -or
+ -name *.cmake -or
+ -name Makefile -or
+ -name core -or
+ -name core.* -or
+ -name gmon.out -or
+ -name install_manifest.txt -or
+ -name *.pc -or
+ -name *~ \)
+ | grep -v TC | xargs rm -rf
+ TARGET distclean
+ VERBATIM
)
ENDIF(UNIX)
diff --git a/debian/rules b/debian/rules
index 75aec6c..42a97c1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,9 @@
CFLAGS = -Wall -g
+FULLVER ?= $(shell dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
+MAJORVER ?= $(shell echo $(FULLVER) | cut -d '.' -f 1)
+
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
@@ -13,7 +16,7 @@ CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
configure: configure-stamp
configure-stamp:
dh_testdir
- mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake ..
+ mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake .. -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER}
touch configure-stamp