102 lines
2.7 KiB
Diff
102 lines
2.7 KiB
Diff
|
From cfb888a04897f9704d5bdfaf4d2979e9ff303aab Mon Sep 17 00:00:00 2001
|
||
|
From: Andrew Bell <andrew.bell.ia@gmail.com>
|
||
|
Date: Mon, 6 Mar 2017 15:41:20 -0600
|
||
|
Subject: [PATCH] Allow laszip to be found in laszip subdirectory or not. Close
|
||
|
#1503
|
||
|
|
||
|
---
|
||
|
cmake/modules/FindLASzip.cmake | 24 ++++++++++++++++++------
|
||
|
io/LasZipPoint.hpp | 6 +++---
|
||
|
pdal/pdal_config.cpp | 2 +-
|
||
|
tools/lasdump/Dumper.cpp | 4 ++--
|
||
|
4 files changed, 24 insertions(+), 12 deletions(-)
|
||
|
|
||
|
diff --git a/cmake/modules/FindLASzip.cmake b/cmake/modules/FindLASzip.cmake
|
||
|
index 38d32c1..27c8352 100644
|
||
|
--- a/cmake/modules/FindLASzip.cmake
|
||
|
+++ b/cmake/modules/FindLASzip.cmake
|
||
|
@@ -37,12 +37,23 @@ ENDIF()
|
||
|
|
||
|
|
||
|
FIND_PATH(LASZIP_INCLUDE_DIR
|
||
|
- laszip/laszip.hpp
|
||
|
+ laszip.hpp
|
||
|
PATHS
|
||
|
- /usr/include
|
||
|
- /usr/local/include
|
||
|
- /tmp/lasjunk/include
|
||
|
- ${OSGEO4W_ROOT_DIR}/include)
|
||
|
+ /usr/include/laszip
|
||
|
+ /usr/local/include/laszip
|
||
|
+ ${OSGEO4W_ROOT_DIR}/include/laszip)
|
||
|
+
|
||
|
+if (NOT LASZIP_INCLUDE_DIR)
|
||
|
+ FIND_PATH(LASZIP_INCLUDE_DIR
|
||
|
+ laszip/laszip.hpp
|
||
|
+ PATHS
|
||
|
+ /usr/include
|
||
|
+ /usr/local/include
|
||
|
+ ${OSGEO4W_ROOT_DIR}/include)
|
||
|
+ if (LASZIP_INCLUDE_DIR)
|
||
|
+ set(LASZIP_INCLUDE_DIR ${LASZIP_INCLUDE_DIR}/laszip)
|
||
|
+ endif()
|
||
|
+endif()
|
||
|
|
||
|
SET(LASZIP_NAMES ${OSGEO4W_IMPORT_LIBRARY} laszip)
|
||
|
|
||
|
@@ -57,7 +68,8 @@ FIND_LIBRARY(LASZIP_LIBRARY
|
||
|
IF(LASZIP_INCLUDE_DIR)
|
||
|
SET(LASZIP_VERSION 0)
|
||
|
|
||
|
- SET(LASZIP_VERSION_H "${LASZIP_INCLUDE_DIR}/laszip/laszip.hpp")
|
||
|
+ message(STATUS "*** ${LASZIP_INCLUDE_DIR} ***")
|
||
|
+ SET(LASZIP_VERSION_H "${LASZIP_INCLUDE_DIR}/laszip.hpp")
|
||
|
FILE(READ ${LASZIP_VERSION_H} LASZIP_VERSION_H_CONTENTS)
|
||
|
|
||
|
IF (DEFINED LASZIP_VERSION_H_CONTENTS)
|
||
|
diff --git a/io/LasZipPoint.hpp b/io/LasZipPoint.hpp
|
||
|
index abe6eea..57c049b 100644
|
||
|
--- a/io/LasZipPoint.hpp
|
||
|
+++ b/io/LasZipPoint.hpp
|
||
|
@@ -37,9 +37,9 @@
|
||
|
#include <vector>
|
||
|
|
||
|
#ifdef PDAL_HAVE_LASZIP
|
||
|
-#include <laszip/laszip.hpp>
|
||
|
-#include <laszip/lasunzipper.hpp>
|
||
|
-#include <laszip/laszipper.hpp>
|
||
|
+#include <laszip.hpp>
|
||
|
+#include <lasunzipper.hpp>
|
||
|
+#include <laszipper.hpp>
|
||
|
#endif
|
||
|
|
||
|
namespace pdal
|
||
|
diff --git a/pdal/pdal_config.cpp b/pdal/pdal_config.cpp
|
||
|
index ca45025..2703ebc 100644
|
||
|
--- a/pdal/pdal_config.cpp
|
||
|
+++ b/pdal/pdal_config.cpp
|
||
|
@@ -61,7 +61,7 @@
|
||
|
#endif
|
||
|
|
||
|
#ifdef PDAL_HAVE_LASZIP
|
||
|
-#include <laszip/laszip.hpp>
|
||
|
+#include <laszip.hpp>
|
||
|
#endif
|
||
|
|
||
|
#include <geos_c.h>
|
||
|
diff --git a/tools/lasdump/Dumper.cpp b/tools/lasdump/Dumper.cpp
|
||
|
index b4ccb33..d126c2f 100644
|
||
|
--- a/tools/lasdump/Dumper.cpp
|
||
|
+++ b/tools/lasdump/Dumper.cpp
|
||
|
@@ -32,8 +32,8 @@
|
||
|
* OF SUCH DAMAGE.
|
||
|
****************************************************************************/
|
||
|
|
||
|
-#include <laszip/laszip.hpp>
|
||
|
-#include <laszip/lasunzipper.hpp>
|
||
|
+#include <laszip.hpp>
|
||
|
+#include <lasunzipper.hpp>
|
||
|
|
||
|
#include <pdal/util/IStream.hpp>
|
||
|
|