File: FindLASLIB.cmake

package info (click to toggle)
cgal 6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144,912 kB
  • sloc: cpp: 810,858; ansic: 208,477; sh: 493; python: 411; makefile: 286; javascript: 174
file content (52 lines) | stat: -rw-r--r-- 1,679 bytes parent folder | download | duplicates (2)
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
# - Try to find LASLIB
# Once done this will define
#
#  LASLIB_FOUND = LASLIB_FOUND - TRUE
#  LASLIB_INCLUDE_DIR - include directory for LASlib
#  LASZIP_INCLUDE_DIR - include directory for LASzip
#  LASLIB_LIBRARIES   - the libraries (as targets)

# first look in user defined locations
find_path(LASLIB_INCLUDE_DIR
          NAMES lasreader.hpp
         PATHS /usr/local/include/LASlib/
                   ENV LASLIB_INC_DIR
         )

find_path(LASZIP_INCLUDE_DIR
          NAMES mydefs.hpp
          PATHS /usr/local/include/LASzip/
                ${LASLIB_INCLUDE_DIR}/../../LASzip/src
                ${LASLIB_INCLUDE_DIR}/../LASzip
                ${LASLIB_INCLUDE_DIR}
         )

find_library(LASLIB_LIBRARIES
             NAMES las
             PATHS ENV LD_LIBRARY_PATH
                   ENV LIBRARY_PATH
                   /usr/local/lib
                   /usr/local/lib/LASlib
                   ${LASLIB_INCLUDE_DIR}/../../lib
                  ENV LASLIB_LIB_DIR
            )
if (NOT LASLIB_LIBRARIES)
  #library was renamed in recent versions of LAStools
  find_library(LASLIB_LIBRARIES
               NAMES LASlib
               PATHS ENV LD_LIBRARY_PATH
                     ENV LIBRARY_PATH
                     /usr/local/lib
                     /usr/local/lib/LASlib
                     ${LASLIB_INCLUDE_DIR}/../../lib
                    ENV LASLIB_LIB_DIR
              )
endif()

if(LASLIB_LIBRARIES AND LASLIB_INCLUDE_DIR AND LASZIP_INCLUDE_DIR)
  if (NOT ${LASLIB_INCLUDE_DIR} STREQUAL ${LASZIP_INCLUDE_DIR})
    list(APPEND LASLIB_INCLUDE_DIR ${LASZIP_INCLUDE_DIR})
  endif()
  set(LASLIB_FOUND TRUE)
  set(LASLIB_USE_FILE "UseLASLIB")
endif()