diff options
author | Klaus Kämpf <kkaempf@suse.de> | 2010-11-24 17:46:03 +0100 |
---|---|---|
committer | Klaus Kämpf <kkaempf@suse.de> | 2010-11-24 17:46:03 +0100 |
commit | f5c9977c4842ebafc53fe395c79b8c38091b59e5 (patch) | |
tree | 1a5791ae3c317830fd6fcb8e99149dc2ca531db7 | |
parent | 9efb0ff464be9c49db686762db07b029f7fcdb2e (diff) | |
parent | 5fb5bfe9a2e8247f21449d0112eeb2951b73dfc9 (diff) | |
download | libzypp-bindings-f5c9977c4842ebafc53fe395c79b8c38091b59e5.tar.gz libzypp-bindings-f5c9977c4842ebafc53fe395c79b8c38091b59e5.tar.bz2 libzypp-bindings-f5c9977c4842ebafc53fe395c79b8c38091b59e5.zip |
Merge branch 'master' of gitorious.org:opensuse/libzypp-bindings
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 63c2ebb..c24a4a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,19 @@ FIND_PACKAGE(SWIG REQUIRED) FIND_PACKAGE(Zypp REQUIRED) -SET( SWIG_DEFINITIONS -DZYPP_DEPRECATED ) +# determine zypp version +EXECUTE_PROCESS(COMMAND "/usr/bin/readlink" ${ZYPP_LIBRARY} OUTPUT_VARIABLE ZYPP_SOFILE) + +# match number at end, strip trailing \n by using a sub-match +STRING(REGEX MATCH "([0-9]+)\n$" ZYPP_VERSION "${ZYPP_SOFILE}") +SET( ZYPP_VERSION "${CMAKE_MATCH_1}" ) +MESSAGE(STATUS "Zypp so library: ${ZYPP_SOFILE}, version ${ZYPP_VERSION}") + +SET( SWIG_DEFINITIONS -DZYPP_DEPRECATED -DZYPP_VERSION=${ZYPP_VERSION} ) + +# +# Finding Boost +# FIND_PATH( BOOST_SMARTPTR_INCLUDE_DIR boost/smart_ptr/shared_ptr.hpp /usr/include |