]> code.ossystems Code Review - openembedded-core.git/commitdiff
sat-solver: fix for non /usr/lib libdir case
authorYu Ke <ke.yu@intel.com>
Wed, 13 Jul 2011 08:57:39 +0000 (16:57 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Jul 2011 11:14:04 +0000 (12:14 +0100)
when libdir set to non /usr/lib like /usr/lib64, there is do_configure error:
"
-- Libraries will be installed in /usr/lib
CMake Error at /home/kyu3/sdb/lib64/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91  (MESSAGE):
  Please install 'check' and 'check-devel' packages (missing: CHECK_LIBRARY)
Call Stack (most recent call first):
  /home/kyu3/sdb/lib64/tmp/sysroots/x86_64-linux/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252              (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindCheck.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:35 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
"

The reason is that cmake did not search /usr/lib64 for libcheck, thus report error

add ${libdir} to the CMAKE_SYSTEM_LIBRARY_PATH can fix this issue.

Signed-off-by: Yu Ke <ke.yu@intel.com>
meta/classes/cmake.bbclass
meta/recipes-extended/sat-solver/sat-solver_git.bb

index 672325e2d5788ceb533e7dae93772f182808c264..5ac540cfcc8bf1473cd2fce13278d160e388ccb4 100644 (file)
@@ -55,6 +55,10 @@ set( CMAKE_INSTALL_RPATH ${OECMAKE_RPATH} )
 
 # Use native cmake modules
 set( CMAKE_MODULE_PATH ${STAGING_DATADIR}/cmake/Modules/ )
+
+# add for non /usr/lib libdir, e.g. /usr/lib64
+LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${libdir})
+
 EOF
 }
 
index c608bb7cc28addcc55770b757ae15afc927676df..9b212dbf0354ec77300b4f43da40ec75e690a27b 100644 (file)
@@ -8,7 +8,7 @@ DEPENDS = "libcheck rpm zlib expat db"
 
 SRCREV = "0a7378d5f482f477a01cf1690d76871ab8bdcc32"
 PV = "0.0-git${SRCPV}"
-PR = "r10"
+PR = "r11"
 
 PARALLEL_MAKE=""
 
@@ -23,7 +23,9 @@ SRC_URI = "git://gitorious.org/opensuse/sat-solver.git;protocol=git \
 
 S = "${WORKDIR}/git"
 
-EXTRA_OECMAKE += "-DLIB=lib -DRPM5=RPM5 -DOE_CORE=OE_CORE"
+EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
+
+EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
 
 inherit cmake pkgconfig