forked from tudelft3d/3dfier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindlibLAS.cmake
64 lines (54 loc) · 1.9 KB
/
FindlibLAS.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
###############################################################################
#
# CMake module to search for libLAS library
#
# On success, the macro sets the following variables:
# LIBLAS_FOUND = if the library found
# LIBLAS_LIBRARIES = full path to the library
# LIBLAS_INCLUDE_DIR = where to find the library headers also defined,
# but not for general use are
# LIBLAS_LIBRARY = where to find the PROJ.4 library.
# LIBLAS_VERSION = version of library which was found, e.g. "1.2.5"
#
# Copyright (c) 2009 Mateusz Loskot <[email protected]>
#
# Module source: http://github.com/mloskot/workshop/tree/master/cmake/
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
###############################################################################
MESSAGE(STATUS "Searching for LibLAS ${LibLAS_FIND_VERSION}+ library")
IF(LIBLAS_INCLUDE_DIR)
# Already in cache, be silent
SET(LIBLAS_FIND_QUIETLY TRUE)
ENDIF()
IF(WIN32)
IF(DEFINED ENV{LIBLAS_ROOT})
SET(LIBLAS_ROOT_DIR $ENV{LIBLAS_ROOT})
#MESSAGE(STATUS " FindLibLAS: trying LIBLAS using environment variable LIBLAS_ROOT=$ENV{LIBLAS_ROOT}")
ELSE()
SET(LIBLAS_ROOT_DIR c:/liblas)
#MESSAGE(STATUS " FindLibLAS: trying LIBLAS using default location LIBLAS_ROOT=c:/liblas")
ENDIF()
ENDIF()
FIND_PATH(LIBLAS_INCLUDE_DIR
liblas.hpp
PATH_PREFIXES liblas
PATHS
/usr/include
/usr/local/include
/tmp/lasjunk/include
${LIBLAS_ROOT_DIR}/include)
find_library(LIBLAS_LIBRARY
NAMES liblas.dylib liblas
PATHS
/usr/lib
/usr/local/lib
/tmp/lasjunk/lib
${LIBLAS_ROOT_DIR}/lib
)
# Handle the QUIETLY and REQUIRED arguments and set LIBLAS_FOUND to TRUE
# if all listed variables are TRUE
#INCLUDE(FindPackageHandleStandardArgs)
#FIND_PACKAGE_HANDLE_STANDARD_ARGS(libLAS DEFAULT_MSG LIBLAS_LIBRARY LIBLAS_INCLUDE_DIR)