summaryrefslogtreecommitdiff
path: root/cmake/FindXZ.cmake
diff options
context:
space:
mode:
authorTeus Benschop <teusjannette@gmail.com>2018-10-28 11:51:26 +0100
committerTeus Benschop <teusjannette@gmail.com>2018-10-28 11:51:26 +0100
commit1d0ff54794b5edea7cdf1d2d66710a0fa885bcc5 (patch)
tree8ece5f9ef437fbb151f2b22ed0c6e1a714879c7c /cmake/FindXZ.cmake
parentc7dbdc9161a7c460526b80fe01af49d714856126 (diff)
New upstream version 1.8.1
Diffstat (limited to 'cmake/FindXZ.cmake')
-rw-r--r--cmake/FindXZ.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/FindXZ.cmake b/cmake/FindXZ.cmake
new file mode 100644
index 0000000..9654c9e
--- /dev/null
+++ b/cmake/FindXZ.cmake
@@ -0,0 +1,28 @@
+# - Try to find XZ
+# Once done this will define
+#
+# XZ_FOUND - system has XZ
+# XZ_INCLUDE_DIR - the XZ include directory
+# XZ_LIBRARY - Link these to use XZ
+# XZ_DEFINITIONS - Compiler switches required for using XZ
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@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 (XZ_INCLUDE_DIR AND XZ_LIBRARY)
+ SET(XZ_FIND_QUIETLY TRUE)
+ENDIF (XZ_INCLUDE_DIR AND XZ_LIBRARY)
+
+FIND_PATH(XZ_INCLUDE_DIR lzma.h )
+
+FIND_LIBRARY(XZ_LIBRARY lzma )
+
+# handle the QUIETLY and REQUIRED arguments and set XZ_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XZ DEFAULT_MSG XZ_LIBRARY XZ_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(XZ_INCLUDE_DIR XZ_LIBRARY)