summaryrefslogtreecommitdiffstats
path: root/cmake/modules/Findqatzip.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /cmake/modules/Findqatzip.cmake
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/Findqatzip.cmake')
-rw-r--r--cmake/modules/Findqatzip.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/modules/Findqatzip.cmake b/cmake/modules/Findqatzip.cmake
new file mode 100644
index 000000000..2d0f2ace3
--- /dev/null
+++ b/cmake/modules/Findqatzip.cmake
@@ -0,0 +1,24 @@
+# - Find qatzip
+# Find the qatzip compression library and includes
+#
+# qatzip_INCLUDE_DIR - where to find qatzip.h, etc.
+# qatzip_LIBRARIES - List of libraries when using qatzip.
+# qatzip_FOUND - True if qatzip found.
+
+find_path(qatzip_INCLUDE_DIR NAMES qatzip.h)
+find_library(qatzip_LIBRARIES NAMES qatzip HINTS /usr/local/lib64/)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(qatzip DEFAULT_MSG qatzip_LIBRARIES qatzip_INCLUDE_DIR)
+
+mark_as_advanced(
+ qatzip_LIBRARIES
+ qatzip_INCLUDE_DIR)
+
+if(qatzip_FOUND AND NOT TARGET qatzip::qatzip)
+ add_library(qatzip::qatzip SHARED IMPORTED)
+ set_target_properties(qatzip::qatzip PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${qatzip_INCLUDE_DIR}"
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+ IMPORTED_LOCATION "${qatzip_LIBRARIES}")
+endif()