Provide a FindLibSolv.cmake file
[platform/upstream/libsolv.git] / CMakeLists.txt
index 9634bc3..ad1fa25 100644 (file)
@@ -2,8 +2,14 @@ PROJECT (libsolv)
 
 CMAKE_MINIMUM_REQUIRED (VERSION 2.4)
 
-OPTION(ENABLE_STATIC "Build a static version of the libraries?" OFF)
-OPTION(DISABLE_SHARED "Do not build a shared version of the libraries?" OFF)
+OPTION (ENABLE_STATIC "Build a static version of the libraries?" OFF)
+OPTION (DISABLE_SHARED "Do not build a shared version of the libraries?" OFF)
+
+OPTION (ENABLE_PERL "Build the perl bindings?" OFF)
+OPTION (ENABLE_PYTHON "Build the python bindings?" OFF)
+OPTION (ENABLE_RUBY "Build the ruby bindings?" OFF)
+
+OPTION (USE_VENDORDIRS "Install the bindings in vendor directories?" OFF)
 
 #IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
 #ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
@@ -31,11 +37,11 @@ SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
 SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+INSTALL( FILES ${CMAKE_MODULE_PATH}/FindLibSolv.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules )
 
 INCLUDE (${CMAKE_SOURCE_DIR}/VERSION.cmake)
 
 FIND_PACKAGE (EXPAT REQUIRED)
-FIND_PACKAGE (Check REQUIRED)
 FIND_PACKAGE (ZLIB REQUIRED)
 
 IF (FEDORA)
@@ -182,6 +188,9 @@ set (CMAKE_C_FLAGS_DEBUG     "${CMAKE_C_FLAGS} -g3 -O0")
 ADD_SUBDIRECTORY (src)
 ADD_SUBDIRECTORY (ext)
 ADD_SUBDIRECTORY (tools)
+IF (ENABLE_PERL OR ENABLE_PYTHON OR ENABLE_RUBY)
+    ADD_SUBDIRECTORY (bindings)
+ENDIF (ENABLE_PERL OR ENABLE_PYTHON OR ENABLE_RUBY)
 ADD_SUBDIRECTORY (examples)
 
 MESSAGE (STATUS "version: ${VERSION}")