[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/sysadmin/shaman
From:       Dario Freddi <drf () kde ! org>
Date:       2010-01-14 22:54:30
Message-ID: 1263509670.543598.6595.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1074914 by dafre:

Improve the buildsystem a bit

Signed-off-by: Dario Freddi <drf@kde.org>

 M  +11 -22    cmake/modules/FindAptPkg.cmake  
 M  +4 -2      libshaman/BackendSelector.cmake  


--- trunk/playground/sysadmin/shaman/cmake/modules/FindAptPkg.cmake #1074913:1074914
@@ -23,34 +23,23 @@
 FIND_LIBRARY(APTPKG_LIBRARY_DEBUG NAMES apt-pkg apt-pkgd  HINTS \
/usr/lib/debug/usr/lib/ )  
 IF( APTPKG_LIBRARY_RELEASE OR APTPKG_LIBRARY_DEBUG AND APTPKG_INCLUDE_DIR )
-	SET( APTPKG_FOUND TRUE )
+    SET( APTPKG_FOUND TRUE )
 ENDIF( APTPKG_LIBRARY_RELEASE OR APTPKG_LIBRARY_DEBUG AND APTPKG_INCLUDE_DIR )
 
 IF( APTPKG_LIBRARY_DEBUG AND APTPKG_LIBRARY_RELEASE )
-	# if the generator supports configuration types then set
-	# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
-	IF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
-		SET( APTPKG_LIBRARIES optimized ${APTPKG_LIBRARY_RELEASE} debug \
                ${APTPKG_LIBRARY_DEBUG} )
-	ELSE( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
+    # if the generator supports configuration types then set
+    # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
+    IF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
+        SET( APTPKG_LIBRARIES optimized ${APTPKG_LIBRARY_RELEASE} debug \
${APTPKG_LIBRARY_DEBUG} ) +    ELSE( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
     # if there are no configuration types and CMAKE_BUILD_TYPE has no value
     # then just use the release libraries
-		SET( APTPKG_LIBRARIES ${APTPKG_LIBRARY_RELEASE} )
-	ENDIF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
+        SET( APTPKG_LIBRARIES ${APTPKG_LIBRARY_RELEASE} )
+    ENDIF( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
 ELSEIF( APTPKG_LIBRARY_RELEASE )
-	SET( APTPKG_LIBRARIES ${APTPKG_LIBRARY_RELEASE} )
+    SET( APTPKG_LIBRARIES ${APTPKG_LIBRARY_RELEASE} )
 ELSE( APTPKG_LIBRARY_DEBUG AND APTPKG_LIBRARY_RELEASE )
-	SET( APTPKG_LIBRARIES ${APTPKG_LIBRARY_DEBUG} )
+    SET( APTPKG_LIBRARIES ${APTPKG_LIBRARY_DEBUG} )
 ENDIF( APTPKG_LIBRARY_DEBUG AND APTPKG_LIBRARY_RELEASE )
 
-IF( APTPKG_FOUND )
-	IF( NOT APTPKG_FIND_QUIETLY )
-		MESSAGE( STATUS "Found AptPkg header file in ${APTPKG_INCLUDE_DIR}")
-		MESSAGE( STATUS "Found AptPkg libraries: ${APTPKG_LIBRARIES}")
-	ENDIF( NOT APTPKG_FIND_QUIETLY )
-ELSE(APTPKG_FOUND)
-	IF( APTPKG_FIND_REQUIRED)
-		MESSAGE( FATAL_ERROR "Could not find AptPkg" )
-	ELSE( APTPKG_FIND_REQUIRED)
-		MESSAGE( STATUS "Optional package AptPkg was not found" )
-	ENDIF( APTPKG_FIND_REQUIRED)
-ENDIF(APTPKG_FOUND)
+find_package_handle_standard_args(AptPkg DEFAULT_MSG APTPKG_LIBRARIES \
                APTPKG_INCLUDE_DIR)
--- trunk/playground/sysadmin/shaman/libshaman/BackendSelector.cmake #1074913:1074914
@@ -1,5 +1,5 @@
 set(SHAMAN_BACKEND "" CACHE STRING "Specifies the Shaman backend to build. Current \
                available options are 
-                                   Aqpm, QPackageKit, Fake, TestScript. Not setting \
this variable will build the most +                                   Aqpm, Apt, \
QPackageKit, Fake, TestScript. Not setting this variable will build the most  \
appropriate backend for your system")  ## Check if the user did not specify a backend \
to be built. If that is the case,  ## we check what is the best backend to build on \
this system. @@ -18,6 +18,8 @@
     else ()
         macro_log_feature(AQPM_FOUND "Aqpm" "QT wrapper library around alpm, Arch \
                Linux Package Management Library."
                           "http://chakra-project.org" FALSE "" "Provides a backend \
for Shaman.") +        macro_log_feature(APTPKG_FOUND "Apqt" "Qt wrapper library \
around apt-pkg, Debian Advanced Package Tool." +                          \
                "http://wiki.debian.org/Apt" FALSE "" "Provides a backend for \
                Shaman.")
         macro_log_feature(QPACKAGEKIT_FOUND "PackageKit" "An universal package \
management system." "http://www.packagekit.org"  FALSE "" "Provides a backend for \
                Shaman.")
         message ("WARNING: No additional packages for building one of the Shaman \
Backends were found. Falling back to Fake backend") @@ -49,7 +51,7 @@
         macro_optional_find_package(AptPkg)
 
         if (NOT APTPKG_FOUND)
-            message ("WARNING: You chose the Apt Shaman backend but you don't have \
Aqpm installed. +            message ("WARNING: You chose the Apt Shaman backend but \
you don't have Apt installed.  Falling back to Fake backend")
                     set (SHAMAN_BACKEND "FAKE")
         endif (NOT APTPKG_FOUND)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic