From 774e5b31e291f23ff305233d5d876d3133c352cb Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Wed, 22 Dec 2010 10:00:07 +0100 Subject: Use FIND_PROGRAM to detect readlink path. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c24a4a8..e823062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,8 @@ FIND_PACKAGE(SWIG REQUIRED) FIND_PACKAGE(Zypp REQUIRED) # determine zypp version -EXECUTE_PROCESS(COMMAND "/usr/bin/readlink" ${ZYPP_LIBRARY} OUTPUT_VARIABLE ZYPP_SOFILE) +FIND_PROGRAM(READ_LINK readlink) +EXECUTE_PROCESS(COMMAND "${READ_LINK}" ${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}") -- cgit v1.2.3