Skip to content

Commit bfdf421

Browse files
committed
applied and adjusted Markus' FindLibLAS.cmake improvement
1 parent ca3f9d8 commit bfdf421

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

cmake/FindLibLAS.cmake

+18-17
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# LIBLAS_LIBRARIES = full path to the library
88
# LIBLAS_INCLUDE_DIR = where to find the library headers also defined,
99
# but not for general use are
10-
# LIBLAS_LIBRARY = where to find the PROJ.4 library.
10+
# LIBLAS_LIBRARY = where to find the library.
1111
# LIBLAS_VERSION = version of library which was found, e.g. "1.2.5"
1212
#
1313
# Copyright (c) 2009 Mateusz Loskot <[email protected]>
@@ -25,16 +25,16 @@ IF(LIBLAS_INCLUDE_DIR)
2525
SET(LIBLAS_FIND_QUIETLY TRUE)
2626
ENDIF()
2727

28-
IF(WIN32)
29-
SET(OSGEO4W_IMPORT_LIBRARY liblas)
30-
IF(DEFINED ENV{OSGEO4W_ROOT})
31-
SET(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT})
32-
#MESSAGE(STATUS " FindLibLAS: trying OSGeo4W using environment variable OSGEO4W_ROOT=$ENV{OSGEO4W_ROOT}")
33-
ELSE()
34-
SET(OSGEO4W_ROOT_DIR c:/OSGeo4W)
35-
#MESSAGE(STATUS " FindLibLAS: trying OSGeo4W using default location OSGEO4W_ROOT=${OSGEO4W_ROOT_DIR}")
36-
ENDIF()
37-
ENDIF()
28+
#IF(WIN32)
29+
# SET(OSGEO4W_IMPORT_LIBRARY liblas)
30+
# IF(DEFINED ENV{OSGEO4W_ROOT})
31+
# SET(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT})
32+
# #MESSAGE(STATUS " FindLibLAS: trying OSGeo4W using environment variable OSGEO4W_ROOT=$ENV{OSGEO4W_ROOT}")
33+
# ELSE()
34+
# SET(OSGEO4W_ROOT_DIR c:/OSGeo4W)
35+
# #MESSAGE(STATUS " FindLibLAS: trying OSGeo4W using default location OSGEO4W_ROOT=${OSGEO4W_ROOT_DIR}")
36+
# ENDIF()
37+
#ENDIF()
3838

3939

4040
FIND_PATH(LIBLAS_INCLUDE_DIR
@@ -43,22 +43,23 @@ FIND_PATH(LIBLAS_INCLUDE_DIR
4343
PATHS
4444
/usr/include
4545
/usr/local/include
46-
/tmp/lasjunk/include
47-
${OSGEO4W_ROOT_DIR}/include)
46+
/tmp/lasjunk/include)
47+
# ${OSGEO4W_ROOT_DIR}/include)
4848

4949
if(WIN32)
50-
SET(LIBLAS_NAMES ${OSGEO4W_IMPORT_LIBRARY} liblas)
50+
SET(LIBLAS_NAMES liblas)
51+
# SET(LIBLAS_NAMES ${OSGEO4W_IMPORT_LIBRARY} liblas)
5152
else()
52-
SET(LIBLAS_NAMES ${OSGEO4W_IMPORT_LIBRARY} las)
53+
SET(LIBLAS_NAMES las)
5354
endif()
5455

5556
FIND_LIBRARY(LIBLAS_LIBRARY
5657
NAMES ${LIBLAS_NAMES}
5758
PATHS
5859
/usr/lib
5960
/usr/local/lib
60-
/tmp/lasjunk/lib
61-
${OSGEO4W_ROOT_DIR}/lib)
61+
/tmp/lasjunk/lib)
62+
# ${OSGEO4W_ROOT_DIR}/lib)
6263

6364
IF(LIBLAS_FOUND)
6465
SET(LIBLAS_LIBRARIES ${LIBLAS_LIBRARY})

0 commit comments

Comments
 (0)