aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <winter@kde.org>2007-12-11 16:53:58 +0000
committerAllen Winter <winter@kde.org>2007-12-11 16:53:58 +0000
commiteda77f4d5da0d13c8ef8dcf965feb57b2ca48e1e (patch)
treeb35aa9e6fc18836c77f0a4347765b3a8c72ba451
parent1ef83bed51a72f782be1344df0a2d8f167b00953 (diff)
downloadextra-cmake-modules-eda77f4d5da0d13c8ef8dcf965feb57b2ca48e1e.tar.gz
extra-cmake-modules-eda77f4d5da0d13c8ef8dcf965feb57b2ca48e1e.tar.bz2
we've been doing without a proper BZip2 development discovery.
svn path=/trunk/KDE/kdelibs/; revision=747297
-rw-r--r--modules/FindBZip2.cmake23
-rw-r--r--modules/potential_problems1
2 files changed, 23 insertions, 1 deletions
diff --git a/modules/FindBZip2.cmake b/modules/FindBZip2.cmake
new file mode 100644
index 00000000..aec276b4
--- /dev/null
+++ b/modules/FindBZip2.cmake
@@ -0,0 +1,23 @@
+# Try to find the BZip2 librairies
+# BZIP2_FOUND - system has BZip2 lib
+# BZIP2_INCLUDE_DIR - the BZip2 include directory
+# BZIP2_LIBRARIES - Libraries needed to use BZip2
+
+# Copyright (c) 2007, Allen Winter <winter@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
+ # Already in cache, be silent
+ set(BZIP2_FIND_QUIETLY TRUE)
+endif (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
+
+find_path(BZIP2_INCLUDE_DIR NAMES bzlib.h )
+find_library(BZIP2_LIBRARIES NAMES bz2 )
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZIP2 DEFAULT_MSG BZIP2_INCLUDE_DIR BZIP2_LIBRARIES)
+
+mark_as_advanced(BZIP2_INCLUDE_DIR BZIP2_LIBRARIES)
diff --git a/modules/potential_problems b/modules/potential_problems
index 233949c5..b4558a21 100644
--- a/modules/potential_problems
+++ b/modules/potential_problems
@@ -1,3 +1,2 @@
/CMakeLists.txt find_package(Perl REQUIRED)
KDE4_AUTOMOC: -DQ_WS_X11
-test for bzip2