Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7504 - in /trunk/libzypp: CMakeLists.txt cmake/modules/FindSatsolver.cmake libzypp.spec.cmake
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Fri, 12 Oct 2007 15:30:19 -0000
  • Message-id: <20071012153019.D2E6745500@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Fri Oct 12 17:30:19 2007
New Revision: 7504

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7504&view=rev
Log:
Add buildrequirement for libsatsolver

Added:
    trunk/libzypp/cmake/modules/FindSatsolver.cmake
Modified:
    trunk/libzypp/CMakeLists.txt
    trunk/libzypp/libzypp.spec.cmake

Modified: trunk/libzypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/CMakeLists.txt?rev=7504&r1=7503&r2=7504&view=diff
==============================================================================
--- trunk/libzypp/CMakeLists.txt (original)
+++ trunk/libzypp/CMakeLists.txt Fri Oct 12 17:30:19 2007
@@ -189,6 +189,13 @@
   INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
 ENDIF( NOT ZLIB_FOUND)
 
+FIND_PACKAGE(Satsolver REQUIRED)
+IF ( NOT SATSOLVER_FOUND )
+  MESSAGE( FATAL_ERROR " libsatsolver not found" )
+ELSE ( NOT SATSOLVER_FOUND )
+  INCLUDE_DIRECTORIES( ${SATSOLVER_INCLUDE_DIR} )
+ENDIF( NOT SATSOLVER_FOUND )
+
 FIND_PROGRAM( DOXYGEN doxygen )
 IF ( NOT DOXYGEN )
   MESSAGE( FATAL_ERROR "doxygen not found: install doxygen to build the documentation." )

Added: trunk/libzypp/cmake/modules/FindSatsolver.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/cmake/modules/FindSatsolver.cmake?rev=7504&view=auto
==============================================================================
--- trunk/libzypp/cmake/modules/FindSatsolver.cmake (added)
+++ trunk/libzypp/cmake/modules/FindSatsolver.cmake Fri Oct 12 17:30:19 2007
@@ -0,0 +1,30 @@
+
+if(SATSOLVER_INCLUDE_DIR AND SATSOLVER_LIBRARY)
+       # Already in cache, be silent
+       set(SATSOLVER_FIND_QUIETLY TRUE)
+endif(SATSOLVER_INCLUDE_DIR AND SATSOLVER_LIBRARY)
+
+set(SATSOLVER_LIBRARY)
+set(SATSOLVER_INCLUDE_DIR)
+
+FIND_PATH(SATSOLVER_INCLUDE_DIR satsolver/solvable.h
+       /usr/include
+       /usr/local/include
+)
+
+FIND_LIBRARY(SATSOLVER_LIBRARY NAMES satsolver0
+       PATHS
+       /usr/lib
+       /usr/local/lib
+)
+
+if(SATSOLVER_INCLUDE_DIR AND SATSOLVER_LIBRARY)
+   MESSAGE( STATUS "satsolver found: includes in ${SATSOLVER_INCLUDE_DIR}, library in ${SATSOLVER_LIBRARY}")
+   set(SATSOLVER_FOUND TRUE)
+else(SATSOLVER_INCLUDE_DIR AND SATSOLVER_LIBRARY)
+   MESSAGE( STATUS "** satsolver not found")
+   MESSAGE( STATUS "** install package libsatsolver-devel")
+   MESSAGE( STATUS "** (http://svn.opensuse.org/svn/zypp/trunk/sat-solver)")
+endif(SATSOLVER_INCLUDE_DIR AND SATSOLVER_LIBRARY)
+
+MARK_AS_ADVANCED(SATSOLVER_INCLUDE_DIR SATSOLVER_LIBRARY)
\ No newline at end of file

Modified: trunk/libzypp/libzypp.spec.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/libzypp.spec.cmake?rev=7504&r1=7503&r2=7504&view=diff
==============================================================================
--- trunk/libzypp/libzypp.spec.cmake (original)
+++ trunk/libzypp/libzypp.spec.cmake Fri Oct 12 17:30:19 2007
@@ -24,7 +24,7 @@
 Provides:       yast2-packagemanager
 Obsoletes:      yast2-packagemanager
 BuildRequires:  cmake
-BuildRequires:  sqlite sqlite-devel
+BuildRequires:  sqlite sqlite-devel libsatsolver-devel
 BuildRequires:  boost-devel curl-devel dejagnu doxygen gcc-c++ graphviz hal-devel libxml2-devel rpm-devel gettext-devel
 BuildRequires: update-desktop-files
 Requires:       gpg2

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages