blob: b22995283ef328971ea2f0fbb0019d4a35e5b878 [file] [log] [blame] [edit]
diff -Naur libLAS-1.8.1.a/cmake/CMakeLists.txt libLAS-1.8.1.b/cmake/CMakeLists.txt
--- libLAS-1.8.1.a/cmake/CMakeLists.txt 2016-08-23 18:41:33.000000000 +0200
+++ libLAS-1.8.1.b/cmake/CMakeLists.txt 2020-06-02 17:45:07.520218400 +0200
@@ -8,6 +8,9 @@
if (NOT WIN32)
set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
set (PROJECT_ROOT_DIR "../../..")
+elseif (MINGW)
+ set(INSTALL_CMAKE_DIR "lib/cmake/${PROJECT_NAME}")
+ set (PROJECT_ROOT_DIR "../../..")
else ()
set(INSTALL_CMAKE_DIR "cmake")
set (PROJECT_ROOT_DIR "..")
diff -Naur libLAS-1.8.1.a/cmake/liblas-config.cmake.in libLAS-1.8.1.b/cmake/liblas-config.cmake.in
--- libLAS-1.8.1.a/cmake/liblas-config.cmake.in 2016-08-23 18:41:33.000000000 +0200
+++ libLAS-1.8.1.b/cmake/liblas-config.cmake.in 2020-06-02 17:34:04.089882000 +0200
@@ -20,7 +20,7 @@
set (libLAS_BINARY_DIRS "${PROJECT_ROOT_DIR}/bin")
include ("${_DIR}/liblas-depends.cmake")
-if(WIN32)
+if(MSVC)
set (libLAS_LIBRARIES liblas liblas_c)
else()
set (libLAS_LIBRARIES las las_c)
diff -Naur libLAS-1.8.1.a/cmake/modules/BuildOSGeo4W.cmake libLAS-1.8.1.b/cmake/modules/BuildOSGeo4W.cmake
--- libLAS-1.8.1.a/cmake/modules/BuildOSGeo4W.cmake 2016-08-23 18:41:33.000000000 +0200
+++ libLAS-1.8.1.b/cmake/modules/BuildOSGeo4W.cmake 2020-06-02 17:45:07.547221100 +0200
@@ -75,7 +75,6 @@
macro(copy_files GLOBPAT DESTINATION )
file(GLOB_RECURSE COPY_FILES
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${GLOBPAT})
foreach(FILENAME ${COPY_FILES})
set(SRC "${FILENAME}")
@@ -133,8 +133,8 @@
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas_c.lib ${OSGEO4W_DEVEL_LIB_DIR}/ )
-copy_directory(./include/liblas/ ${OSGEO4W_DEVEL_INCLUDE_LIBLAS_DIR}/ )
-copy_files(./python/liblas/*.py ${OSGEO4W_PYTHON_DIR}/ )
+copy_directory(${CMAKE_SOURCE_DIR}/include/liblas/ ${OSGEO4W_DEVEL_INCLUDE_LIBLAS_DIR}/ )
+copy_files(${CMAKE_SOURCE_DIR}/python/liblas/*.py ${OSGEO4W_PYTHON_DIR}/ )
tar_directories(${OSGEO4W_DIR} ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}-${OSGEO4W_UPSTREAM_RELEASE}.tar.bz2 "bin/;etc/")
tar_directories(${OSGEO4W_DIR} ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-python-${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}-${OSGEO4W_UPSTREAM_RELEASE}.tar.bz2 apps)
diff -Naur libLAS-1.8.1.a/cmake/modules/FindLASzip.cmake libLAS-1.8.1.b/cmake/modules/FindLASzip.cmake
--- libLAS-1.8.1.a/cmake/modules/FindLASzip.cmake 2016-08-23 18:41:33.000000000 +0200
+++ libLAS-1.8.1.b/cmake/modules/FindLASzip.cmake 2020-06-02 17:45:07.518218200 +0200
@@ -25,7 +25,7 @@
SET(LASZIP_FIND_QUIETLY TRUE)
ENDIF()
-IF(WIN32)
+IF(WIN32 AND NOT MINGW)
SET(OSGEO4W_IMPORT_LIBRARY laszip)
IF(DEFINED ENV{OSGEO4W_ROOT})
SET(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT})
@@ -36,24 +36,32 @@
ENDIF()
ENDIF()
+SET(_laszip_SEARCH_DIRS
+ ${LASZIP_ROOT_DIR}
+ /usr/local
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt/lib/ceres
+)
FIND_PATH(LASZIP_INCLUDE_DIR
- laszip.hpp
- PATH_PREFIXES laszip
- PATHS
- /usr/include
- /usr/local/include
- ${OSGEO4W_ROOT_DIR}/include
- NO_DEFAULT_PATH)
+ NAMES
+ laszip/laszip.hpp
+ HINTS
+ ${_laszip_SEARCH_DIRS}
+ PATH_SUFFIXES
+ include)
SET(LASZIP_NAMES ${OSGEO4W_IMPORT_LIBRARY} laszip)
FIND_LIBRARY(LASZIP_LIBRARY
- NAMES ${LASZIP_NAMES}
- PATHS
- /usr/lib
- /usr/local/lib
- ${OSGEO4W_ROOT_DIR}/lib)
+ NAMES
+ ${LASZIP_NAMES}
+ HINTS
+ ${_laszip_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib)
IF(LASZIP_FOUND)
SET(LASZIP_LIBRARIES ${LASZIP_LIBRARY})
diff -Naur libLAS-1.8.1.a/CMakeLists.txt libLAS-1.8.1.b/CMakeLists.txt
--- libLAS-1.8.1.a/CMakeLists.txt 2016-08-23 18:41:33.000000000 +0200
+++ libLAS-1.8.1.b/CMakeLists.txt 2020-06-02 17:45:07.515217900 +0200
@@ -19,7 +19,7 @@
SET(LIBLAS_C_LIB_SOVERSION "3")
SET(OSGEO4W_UPSTREAM_RELEASE "1")
-if(WIN32)
+if(MSVC)
# Name of C++ library
set(LIBLAS_LIB_NAME liblas)
@@ -295,7 +295,7 @@
###############################################################################
# Installation settings
-if(WIN32)
+if(WIN32 AND NOT MINGW)
set(DEFAULT_LIB_SUBDIR lib)
set(DEFAULT_DATA_SUBDIR .)
set(DEFAULT_INCLUDE_SUBDIR include)
diff -Naur libLAS-1.8.1.a/test/unit/spatialreference_test.cpp libLAS-1.8.1.b/test/unit/spatialreference_test.cpp
--- libLAS-1.8.1.a/test/unit/spatialreference_test.cpp 2016-08-23 18:41:33.000000000 +0200
+++ libLAS-1.8.1.b/test/unit/spatialreference_test.cpp 2020-06-02 17:45:07.545220900 +0200
@@ -110,7 +110,11 @@
liblas::Header const& header = reader.GetHeader();
liblas::SpatialReference const& in_ref = header.GetSRS();
+#ifdef _WIN64
const char* utm15_wkt = "PROJCS[\"NAD83 / UTM zone 15N\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,298.2572221010002,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"26915\"]]";
+#else
+ const char* utm15_wkt = "PROJCS[\"NAD83 / UTM zone 15N\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,298.2572221010042,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"26915\"]]";
+#endif
ensure_equals("Input WKT comparison", in_ref.GetWKT(), utm15_wkt);
const char* epsg4326_wkt = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4326\"]]";
--- liblas-1.8.1/apps/CMakeLists.txt.orig 2020-06-04 13:06:48.540808300 +0300
+++ liblas-1.8.1/apps/CMakeLists.txt 2020-06-04 13:06:58.124194600 +0300
@@ -160,7 +160,7 @@
ARCHIVE DESTINATION ${LIBLAS_LIB_DIR})
-if(UNIX)
+if(UNIX OR MINGW)
set(LIBLAS_UTILS_RPATH ${CMAKE_INSTALL_PREFIX}/lib ${Boost_LIBRARY_DIRS})
if(LASZIP_FOUND)