summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindLzo2.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /cmake/modules/FindLzo2.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'cmake/modules/FindLzo2.cmake')
-rw-r--r--cmake/modules/FindLzo2.cmake37
1 files changed, 37 insertions, 0 deletions
diff --git a/cmake/modules/FindLzo2.cmake b/cmake/modules/FindLzo2.cmake
new file mode 100644
index 0000000..4f7313f
--- /dev/null
+++ b/cmake/modules/FindLzo2.cmake
@@ -0,0 +1,37 @@
1#.rst:
2# FindLzo2
3# --------
4# Finds the Lzo2 library
5#
6# This will will define the following variables::
7#
8# LZO2_FOUND - system has Lzo2
9# LZO2_INCLUDE_DIRS - the Lzo2 include directory
10# LZO2_LIBRARIES - the Lzo2 libraries
11#
12# and the following imported targets::
13#
14# Lzo2::Lzo2 - The Lzo2 library
15
16find_path(LZO2_INCLUDE_DIR NAMES lzo1x.h
17 PATH_SUFFIXES lzo)
18
19find_library(LZO2_LIBRARY NAMES lzo2 liblzo2)
20
21include(FindPackageHandleStandardArgs)
22find_package_handle_standard_args(Lzo2
23 REQUIRED_VARS LZO2_LIBRARY LZO2_INCLUDE_DIR)
24
25if(LZO2_FOUND)
26 set(LZO2_LIBRARIES ${LZO2_LIBRARY})
27 set(LZO2_INCLUDE_DIRS ${LZO2_INCLUDE_DIR})
28
29 if(NOT TARGET Lzo2::Lzo2)
30 add_library(Lzo2::Lzo2 UNKNOWN IMPORTED)
31 set_target_properties(Lzo2::Lzo2 PROPERTIES
32 IMPORTED_LOCATION "${LZO2_LIBRARY}"
33 INTERFACE_INCLUDE_DIRECTORIES "${LZO2_INCLUDE_DIR}")
34 endif()
35endif()
36
37mark_as_advanced(LZO2_INCLUDE_DIR LZO2_LIBRARY)