summaryrefslogtreecommitdiffstats
path: root/cmake/modules/Findqatzip.cmake
blob: 2d0f2ace3887564d7e9985fa1b04ae73ab68aa36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()