summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindLzo2.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
committermanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
commit8cdf8dec703d882b46ca50a769fabb95ffc48e2c (patch)
treef7fe8233508f79d3dc94f8f445ce6342e7dfbdbb /project/cmake/modules/FindLzo2.cmake
parent5823b05feb29a59510c32a9c28ca18b50b9b6399 (diff)
downloadkodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.gz
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.bz2
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindLzo2.cmake')
-rw-r--r--project/cmake/modules/FindLzo2.cmake45
1 files changed, 30 insertions, 15 deletions
diff --git a/project/cmake/modules/FindLzo2.cmake b/project/cmake/modules/FindLzo2.cmake
index 33eee10..4f7313f 100644
--- a/project/cmake/modules/FindLzo2.cmake
+++ b/project/cmake/modules/FindLzo2.cmake
@@ -1,22 +1,37 @@
1# - Try to find Lzo2 1#.rst:
2# Once done this will define 2# FindLzo2
3# --------
4# Finds the Lzo2 library
3# 5#
4# Lzo2_FOUND - system has Lzo2 6# This will will define the following variables::
5# Lzo2_INCLUDE_DIR - the Lzo2 include directory
6# Lzo2_LIBRARIES - Link these to use Lzo2
7# Lzo2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
8
9# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
10# 7#
11# Redistribution and use is allowed according to the terms of the BSD license. 8# LZO2_FOUND - system has Lzo2
12# For details see the accompanying COPYING-CMAKE-SCRIPTS file. 9# LZO2_INCLUDE_DIRS - the Lzo2 include directory
13 10# LZO2_LIBRARIES - the Lzo2 libraries
11#
12# and the following imported targets::
13#
14# Lzo2::Lzo2 - The Lzo2 library
14 15
15FIND_PATH(LZO2_INCLUDE_DIRS lzo1x.h PATH_SUFFIXES lzo) 16find_path(LZO2_INCLUDE_DIR NAMES lzo1x.h
17 PATH_SUFFIXES lzo)
16 18
17FIND_LIBRARY(LZO2_LIBRARIES NAMES lzo2 liblzo2) 19find_library(LZO2_LIBRARY NAMES lzo2 liblzo2)
18 20
19include(FindPackageHandleStandardArgs) 21include(FindPackageHandleStandardArgs)
20find_package_handle_standard_args(Lzo2 DEFAULT_MSG LZO2_INCLUDE_DIRS LZO2_LIBRARIES) 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()
21 36
22MARK_AS_ADVANCED(LZO2_INCLUDE_DIRS LZO2_LIBRARIES) 37mark_as_advanced(LZO2_INCLUDE_DIR LZO2_LIBRARY)