-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindLibtasn1.cmake
46 lines (41 loc) · 1.07 KB
/
FindLibtasn1.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Find Libtasn1
# ~~~~~~~~~~~~~~~
# CMake module to search for Libtasn1 ASN.1 library and header(s) from:
# https://www.gnu.org/software/libtasn1/
#
# If it's found it sets LIBTASN1_FOUND to TRUE
# and following variables are set:
# LIBTASN1_INCLUDE_DIR
# LIBTASN1_LIBRARY
#
# Copyright (c) 2017, Boundless Spatial
# Author: Larry Shaffer <lshaffer (at) boundlessgeo (dot) com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
find_path(LIBTASN1_INCLUDE_DIR
NAMES libtasn1.h
PATHS
${LIB_DIR}/include
"$ENV{LIB_DIR}/include"
$ENV{INCLUDE}
/usr/local/include
/usr/include
)
find_library(LIBTASN1_LIBRARY
NAMES tasn1
PATHS
${LIB_DIR}
$ENV{LIB_DIR}/lib
"$ENV{LIB_DIR}"
$ENV{LIB}
/usr/local/lib
/usr/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Libtasn1
REQUIRED_VARS LIBTASN1_INCLUDE_DIR LIBTASN1_LIBRARY
FOUND_VAR LIBTASN1_FOUND
)
mark_as_advanced(LIBTASN1_INCLUDE_DIR LIBTASN1_LIBRARY)