INCLUDE( ${CMAKE_SOURCE_DIR}/VERSION.cmake )
MATH( EXPR LIBZYPP_CURRENT "${LIBZYPP_MAJOR} * 100 + ${LIBZYPP_MINOR}" )
MATH( EXPR LIBZYPP_AGE "${LIBZYPP_MINOR} - ${LIBZYPP_COMPATMINOR}" )
+
SET( PACKAGE "libzypp" )
SET( VERSION "${LIBZYPP_MAJOR}.${LIBZYPP_MINOR}.${LIBZYPP_PATCH}" )
+
+ADD_DEFINITIONS( -DVERSION=\\\"${VERSION}\\\" )
SET( LIBZYPP_VERSION_INFO "-version-info ${LIBZYPP_CURRENT}:${LIBZYPP_PATCH}:${LIBZYPP_AGE}" )
+
+
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Novell's package management core engine.")
SET(CPACK_PACKAGE_VENDOR "Novell Inc.")
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
INCLUDE(CPack)
INCLUDE(DefineInstallationPaths)
-ADD_DEFINITIONS( -DVERSION=\\\"${VERSION}\\\" )
-
FIND_PACKAGE(Rpm REQUIRED)
-FIND_PACKAGE(Boost REQUIRED)
-FIND_PACKAGE(Gettext REQUIRED)
-FIND_PACKAGE(Hal REQUIRED)
-FIND_PACKAGE(Dbus REQUIRED)
-FIND_PACKAGE(Glib REQUIRED)
-FIND_PACKAGE(Curl REQUIRED)
-FIND_PACKAGE(Libxml REQUIRED)
-FIND_PACKAGE(Sqlite REQUIRED)
-FIND_PACKAGE(ZLIB REQUIRED)
-
IF ( NOT RPM_FOUND)
MESSAGE( FATAL_ERROR " rpm not found" )
ELSE ( NOT RPM_FOUND)
INCLUDE_DIRECTORIES(${RPM_INCLUDE_DIR})
ENDIF( NOT RPM_FOUND)
-IF ( NOT ZLIB_FOUND)
- MESSAGE( FATAL_ERROR " zlib not found" )
-ELSE ( NOT ZLIB_FOUND)
- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
-ENDIF( NOT ZLIB_FOUND)
+FIND_PACKAGE(Boost REQUIRED)
+IF (Boost_FOUND)
+ MESSAGE( STATUS "boost found: includes in ${Boost_INCLUDE_DIRS}, library in ${Boost_LIBRARY_DIRS}")
+ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+ENDIF(Boost_FOUND)
+FIND_PACKAGE(Gettext REQUIRED)
IF (GETTEXT_FOUND)
MESSAGE(STATUS "Found Gettext: ${GETTEXT_SOURCE}")
INCLUDE_DIRECTORIES(${GETTEXT_INCLUDE_DIR})
MESSAGE( FATAL_ERROR "Gettext not found" )
ENDIF (GETTEXT_FOUND)
-IF (Boost_FOUND)
- MESSAGE( STATUS "boost found: includes in ${Boost_INCLUDE_DIRS}, library in ${Boost_LIBRARY_DIRS}")
- INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
- LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
-ENDIF(Boost_FOUND)
-
-IF ( NOT LIBXML_FOUND)
- MESSAGE( FATAL_ERROR " libxml not found" )
-ELSE ( NOT LIBXML_FOUND)
- INCLUDE_DIRECTORIES(${LIBXML_INCLUDE_DIR})
-ENDIF( NOT LIBXML_FOUND)
-
-IF ( NOT CURL_FOUND)
- MESSAGE( FATAL_ERROR " curl not found" )
-ELSE ( NOT CURL_FOUND)
- INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
-ENDIF( NOT CURL_FOUND)
-
+FIND_PACKAGE(Hal REQUIRED)
IF ( NOT HAL_FOUND)
MESSAGE( FATAL_ERROR " Hal not found" )
ELSE ( NOT HAL_FOUND)
INCLUDE_DIRECTORIES(${HAL_INCLUDE_DIR}/hal)
ENDIF( NOT HAL_FOUND)
+FIND_PACKAGE(Dbus REQUIRED)
IF ( NOT DBUS_FOUND)
MESSAGE( FATAL_ERROR " dbus not found" )
ELSE ( NOT DBUS_FOUND)
INCLUDE_DIRECTORIES(${DBUS_ARCH_INCLUDE_DIR})
ENDIF( NOT DBUS_FOUND)
+FIND_PACKAGE(Glib REQUIRED)
IF (GLIB_FOUND)
MESSAGE( STATUS "glib found: includes in ${GLIB_INCLUDE_DIR}, library in ${GLIB_LIBRARY}")
INCLUDE_DIRECTORIES(${GLIB_INCLUDE_DIR})
# MESSAGE( ERROR "dbus-glib not found" )
#ENDIF(DBUS_GLIB_FOUND)
+FIND_PACKAGE(Curl REQUIRED)
+IF ( NOT CURL_FOUND)
+ MESSAGE( FATAL_ERROR " curl not found" )
+ELSE ( NOT CURL_FOUND)
+ INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
+ENDIF( NOT CURL_FOUND)
+
+FIND_PACKAGE(Libxml REQUIRED)
+IF ( NOT LIBXML_FOUND)
+ MESSAGE( FATAL_ERROR " libxml not found" )
+ELSE ( NOT LIBXML_FOUND)
+ INCLUDE_DIRECTORIES(${LIBXML_INCLUDE_DIR})
+ENDIF( NOT LIBXML_FOUND)
+
+FIND_PACKAGE(Sqlite REQUIRED)
+
+FIND_PACKAGE(ZLIB REQUIRED)
+IF ( NOT ZLIB_FOUND)
+ MESSAGE( FATAL_ERROR " zlib not found" )
+ELSE ( NOT ZLIB_FOUND)
+ INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+ENDIF( NOT ZLIB_FOUND)
+
FIND_PROGRAM( DOXYGEN doxygen )
IF ( NOT DOXYGEN )
MESSAGE( FATAL_ERROR "doxygen not found: install doxygen to build the documentation." )
MESSAGE(STATUS "soname: ${LIBZYPP_CURRENT}.${LIBZYPP_PATCH}.${LIBZYPP_AGE}")
MESSAGE(STATUS "version: ${VERSION}")
-#yumschemadir=${zyppdir}/schema/yum
-#xmlstoreschemadir=${zyppdir}/schema/xmlstore
####################################################################
# RPM SPEC #
####################################################################
#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
+#yumschemadir=${zyppdir}/schema/yum
+#xmlstoreschemadir=${zyppdir}/schema/xmlstore
####################################################################
# INSTALL #