summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-23 20:22:40 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-23 20:22:40 +0000
commitcf21ddc3cce570e574364e841758b59c0f8e8e04 (patch)
tree9f79e4569bb2991b4de8c25dd23795126ac0914c /ConfigureChecks.cmake
parentf9c30e41d26594598abaa8315c4488b6c5ff38ea (diff)
downloadtdevelop-cf21ddc3cce570e574364e841758b59c0f8e8e04.tar.gz
tdevelop-cf21ddc3cce570e574364e841758b59c0f8e8e04.zip
[kdevelop] initial cmake support
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1216516 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake70
1 files changed, 50 insertions, 20 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index c708db86..29125f87 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -1,27 +1,57 @@
-INCLUDE(CheckIncludeFiles)
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
-#check for libz using the cmake supplied FindZLIB.cmake
-INCLUDE(FindZLIB)
+check_include_file( "sys/stropts.h" HAVE_SYS_STROPTS_H )
+check_function_exists( "mkfifo" HAVE_MKFIFO )
-IF(ZLIB_FOUND)
- SET(HAVE_LIBZ 1)
-ELSE(ZLIB_FOUND)
- SET(HAVE_LIBZ 0)
-ENDIF(ZLIB_FOUND)
-#check for png
-INCLUDE(FindPNG)
-IF(PNG_FOUND)
- SET(HAVE_LIBPNG 1)
-ELSE(PNG_FOUND)
- SET(HAVE_LIBPNG 0)
-ENDIF(PNG_FOUND)
+# check for berkeley db
+# we need at least bdb 4.1, but I do not check for version
+# because this is really old and trinity will not
+# working anyway on such old systems
+check_c_source_compiles("
+ #include <db.h>
+ void main() { DB *db; db->open(db, 0, 0, NULL, DB_BTREE, DB_CREATE, 0644); } "
+ HAVE_BERKELEY_DB )
-#now check for dlfcn.h using the cmake supplied CHECK_INCLUDE_FILE() macro
+if( HAVE_BERKELEY_DB )
+ set( BDB_LIBRARY db )
+else( )
+ tde_message_fatal( "berkeley db are required, but not found on your system" )
+endif( )
-CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
-SET(CONFIG_QT_DOCDIR "\"/usr/lib/qt/doc/html/\"")
-SET(CONFIG_KDELIBS_DOXYDIR "\"/tmp/\"")
+# check for subversion
+if( WITH_VCS_SUBVERSION )
+ pkg_search_module( APR apr-1 )
+ if( NOT APR_FOUND )
+ tde_message_fatal( "apr-1 are requested, but not found on your system" )
+ endif( )
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_SOURCE_DIR}/config.h)
+ tde_save( CMAKE_REQUIRED_INCLUDES )
+ set( CMAKE_REQUIRED_INCLUDES ${APR_INCLUDE_DIRS} )
+ check_include_file_cxx( "subversion-1/svn_types.h" HAVE_SUBVERSION_1_SVN_TYPES_H )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+
+ check_library_exists( svn_client-1 svn_client_version "" HAVE_SVN_CLIENT_1 )
+
+ if( NOT (HAVE_SUBVERSION_1_SVN_TYPES_H AND HAVE_SVN_CLIENT_1) )
+ tde_message_fatal( "svn_client-1 are requested, but not found on your system" )
+ endif( )
+
+ set( SVN_LIBRARIES svn_client-1 svn_subr-1 svn_ra-1 )
+endif( )
+
+
+# required stuff
+find_package( Qt )
+find_package( TQt )
+find_package( TDE )