MATH( EXPR LIBZYPP_SO_FIRST "${LIBZYPP_CURRENT}-${LIBZYPP_AGE}" )
SET( VERSION "${LIBZYPP_MAJOR}.${LIBZYPP_MINOR}.${LIBZYPP_PATCH}" )
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed" )
-SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -g -Wall -Wl,-as-needed" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fPIC -g -Wall -Werror=format-security -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed" )
+SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing -fPIC -g -Wall -Werror=format-security -Wl,-as-needed" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3" )
SET_SOURCE_FILES_PROPERTIES( ${loop_var}_test.cc COMPILE_FLAGS "-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN -DBOOST_AUTO_TEST_MAIN=\"\" " )
ADD_EXECUTABLE( ${loop_var}_test ${loop_var}_test.cc )
TARGET_LINK_LIBRARIES( ${loop_var}_test zypp boost_unit_test_framework zypp_test_utils)
- ADD_TEST( ${loop_var}_test ${CMAKE_CURRENT_BINARY_DIR}/${loop_var}_test)
+ ADD_TEST( ${loop_var}_test ${CMAKE_CURRENT_BINARY_DIR}/${loop_var}_test --catch_system_errors=no)
ENDFOREACH( loop_var )
ENDMACRO(ADD_TESTS)
INCLUDE_DIRECTORIES(${RPM_INCLUDE_DIR})
# fix includes not relative to rpm
INCLUDE_DIRECTORIES(${RPM_INCLUDE_DIR}/rpm)
+ if ( RPM_SUSPECT_VERSION STREQUAL "5.x" )
+ MESSAGE( STATUS "rpm found: enable rpm-4 compat interface." )
+ ADD_DEFINITIONS(-D_RPM_5)
+ elseif ( RPM_SUSPECT_VERSION STREQUAL "4.x" )
+ MESSAGE( STATUS "rpm found: enable rpm-4.4 legacy interface." )
+ ADD_DEFINITIONS(-D_RPM_4_4_COMPAT)
+ endif ( RPM_SUSPECT_VERSION STREQUAL "5.x" )
ENDIF( NOT RPM_FOUND)
FIND_PACKAGE(Boost REQUIRED)
MESSAGE( FATAL_ERROR "Gettext not found" )
ENDIF (GETTEXT_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/libhal-storage.h is broken grrr
- 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_INCLUDE_DIR})
- INCLUDE_DIRECTORIES(${DBUS_ARCH_INCLUDE_DIR})
-ENDIF( NOT DBUS_FOUND)
-
FIND_PACKAGE(Curl REQUIRED)
IF ( NOT CURL_FOUND)
MESSAGE( FATAL_ERROR " curl not found" )
FIND_PACKAGE(EXPAT REQUIRED)
FIND_PACKAGE(OpenSSL REQUIRED)
+FIND_PACKAGE(Udev REQUIRED)
FIND_PROGRAM( DOXYGEN doxygen )
IF ( NOT DOXYGEN )
# do not build devel by default
ADD_SUBDIRECTORY( devel EXCLUDE_FROM_ALL )
ADD_SUBDIRECTORY( tools )
-#ADD_SUBDIRECTORY( examples )
+ADD_SUBDIRECTORY( examples )
ADD_SUBDIRECTORY( po EXCLUDE_FROM_ALL )
ADD_SUBDIRECTORY( doc )
ADD_SUBDIRECTORY( vendor )