FIND_PACKAGE(Check REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)
+IF ( FEDORA )
+MESSAGE(STATUS "Building for Fedora")
+ADD_DEFINITIONS( -DFEDORA )
+FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm)
+ELSE ( FEDORA )
FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
+ENDIF ( FEDORA)
SET( PACKAGE "satsolver" )
SET( VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}.${LIBSATSOLVER_PATCH}" )
####################################################################
MESSAGE(STATUS "Looking modules in ${CMAKE_MODULE_PATH}")
-#FIND_PROGRAM(SWIG_EXECUTABLE
-# NAMES swig-1.3 swig
-# PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
-#)
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall" )
set ( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -g -O3" )
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(applayer)
ADD_SUBDIRECTORY(tests)
+ADD_SUBDIRECTORY(doc)
-FIND_PACKAGE(SWIG REQUIRED)
+FIND_PACKAGE(SWIG)
IF ( SWIG_FOUND )
ADD_SUBDIRECTORY(bindings)
+ELSE ( SWIG_FOUND )
+ # for older version of swig/cmake
+ FIND_PROGRAM(SWIG_EXECUTABLE
+ NAMES swig-1.3 swig
+ PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
+ )
+ IF ( SWIG_EXECUTABLE )
+ ADD_SUBDIRECTORY(bindings)
+ ENDIF ( SWIG_EXECUTABLE )
ENDIF ( SWIG_FOUND )
MESSAGE(STATUS "version: ${VERSION}")