Skip to content
Commits on Source (15)
......@@ -40,6 +40,7 @@ Debug/
Release/
RelWithDebInfo/
ipch/
CMakeSettings.json
*.sln
*.vcxproj
*.vcxproj.filters
......
......@@ -6,10 +6,10 @@ sudo: required
services: docker
before_install:
- docker pull alpine:3.7
- docker pull pdal/dependencies:alpine
script:
- docker run -v $TRAVIS_BUILD_DIR:/pdal -t alpine:3.7 /bin/sh -c "/pdal/scripts/ci/script.sh"
- docker run -v $TRAVIS_BUILD_DIR:/pdal -t pdal/dependencies:alpine /bin/sh -c "/pdal/scripts/ci/script.sh"
after_success:
- echo "secure travis:" "$TRAVIS_SECURE_ENV_VARS"
......
To cite PDAL in publications use:
PDAL contributors (2018). PDAL: The Point Data Abstraction Library
URL https://pdal.io/.
A BibTeX entry for LaTeX users is
@Manual{,
title = {{PDAL}: The Point Data Abstraction Library},
author = {{PDAL contributors}},
year = {2018},
url = {https://pdal.io/},
}
......@@ -3,7 +3,7 @@
#
# (based originally on the libLAS files copyright Mateusz Loskot)
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(PDAL CXX C)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
......@@ -28,14 +28,14 @@ mark_as_advanced(CMAKE_VERBOSE_MAKEFILE)
# the next line is the ONLY place in the entire pdal system where
# the version info is hard-coded
set(PDAL_VERSION_STRING "1.7.2" CACHE STRING "PDAL version" FORCE)
set(PDAL_VERSION_STRING "1.8.0" CACHE STRING "PDAL version")
DISSECT_VERSION()
GET_OS_INFO()
SET_INSTALL_DIRS()
set(PDAL_API_VERSION "6")
set(PDAL_BUILD_VERSION "7.0.2")
set(PDAL_API_VERSION "7")
set(PDAL_BUILD_VERSION "8.0.0")
# Name of C++ library
......@@ -216,6 +216,7 @@ if (NOT PDAL_HAVE_LIBXML2)
file(GLOB XML_SRCS
io/Ilvis2MetadataReader.cpp
io/Ilvis2Metadata.cpp
io/Ilvis2Reader.cpp
${PDAL_SRC_DIR}/DbWriter.cpp
${PDAL_SRC_DIR}/DbReader.cpp
${PDAL_SRC_DIR}/XMLSchema.cpp)
......@@ -257,7 +258,7 @@ target_include_directories(${PDAL_BASE_LIB_NAME}
${PDAL_VENDOR_DIR}/pdalboost
${PDAL_JSONCPP_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${ZSTD_INCLUDE_DIR}
${ZSTD_INCLUDE_DIRS}
INTERFACE
${GDAL_INCLUDE_DIR}
${LASZIP_INCLUDE_DIR}
......@@ -272,7 +273,7 @@ target_link_libraries(${PDAL_BASE_LIB_NAME}
${LIBXML2_LIBRARIES}
${ZLIB_LIBRARIES}
${LIBLZMA_LIBRARIES}
${ZSTD_STATIC_LIB}
${ZSTD_LIBRARIES}
${CURL_LIBRARIES}
${WINSOCK_LIBRARY}
${PDAL_REEXPORT}
......@@ -311,12 +312,36 @@ endif()
#
# Installation
#
#
# Only install compression headers if we're building with the particular
# compression type.
#
if (NOT PDAL_HAVE_ZSTD)
set(ZSTD_EXCLUDES PATTERN pdal/compression/Zstd* EXCLUDE)
endif()
if (NOT PDAL_HAVE_ZLIB)
set(ZLIB_EXCLUDES PATTERN pdal/compression/Deflate* EXCLUDE)
endif()
if (NOT PDAL_HAVE_LZMA)
set(LZMA_EXCLUDES PATTERN pdal/compression/Lzma* EXCLUDE)
endif()
if (NOT PDAL_HAVE_LAZPERF)
set(LAZPERF_EXCLUDES PATTERN pdal/compression/LazPerf* EXCLUDE)
endif()
install(DIRECTORY ${PDAL_INCLUDE_DIR}/pdal
DESTINATION include
FILES_MATCHING PATTERN "*.hpp"
PATTERN "gitsha.h"
PATTERN "pdal/private" EXCLUDE
PATTERN "pdal/util/private" EXCLUDE
${ZSTD_EXCLUDES}
${ZLIB_EXCLUDES}
${LZMA_EXCLUDES}
${LAZPERF_EXCLUDES}
)
install(DIRECTORY ${PDAL_KERNELS_DIR}
DESTINATION include/pdal
FILES_MATCHING PATTERN "*.hpp"
......
This diff is collapsed.
......@@ -149,3 +149,28 @@ Release Process
::
http://upload.osgeo.org/cgi-bin/osgeo4w-promote.sh
12) Update Alpine package
- The PDAL Alpine package lives at
https://github.com/alpinelinux/aports/blob/master/testing/pdal/APKBUILD.
Pull requests can be made against the alpinelinux/aports repository. If the
build configuration alone is changing, with no version increase, simply
increment the build number `pkgrel`. If the `pkgver` is changing, then
reset `pkgrel` to 0.
- Pull requests should have a commit message of the following form
`testing/pdal: <description>`.
13) Update Conda package
- For PDAL releases that bump version number, but do not change dependencies
or build configurations, the `regro-cf-autotick-bot` should automatically
create a pull request at https://github.com/conda-forge/pdal-feedstock.
Once the builds succeed, the PR can be merged and the updated package will
soon be available in the `conda-forge` channel. If the PR does not build
successfully, updates to the PR can be pushed to the bot's branch. Version
bumps should reset the build number to zero.
- Updates that alter the build configuration but do not bump the version
number should be submitted as PRs from a fork of the
https://github.com/conda-forge/pdal-feedstock repository. In these cases,
the build number should be incremented.
......@@ -6,4 +6,4 @@ PDAL
[![Build Status](https://travis-ci.org/PDAL/PDAL.png?branch=master)](https://travis-ci.org/PDAL/PDAL)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/6dehrm0v22cw58d3/branch/master?svg=true)](https://ci.appveyor.com/project/hobu/pdal)
See http://pdal.io/ for more info
See https://pdal.io/ for more info
================================================================================
1.7.2
1.8.0
================================================================================
Bug Fixes
Changes of Note
===============
- PointTableRef is now publicly accessible from PointView (#1926)
- Minimum CMake version is now 3.5
- ``filters.hexbin`` is now a built-in stage, rather than a plugin.
(#2001)
- Removed support for ``ght`` compression in ``writers.pgpointcloud``.
(#2148)
- On OSX, plugins are now installed with ID of ``@rpath`` rather than
``@loader_path/../lib``
Enhancements
============
- Added ``denoise`` and ``reset`` options to ``pdal ground``. (#1579)
- ``readers.gdal`` now supports stream mode and provides the ``header``
option to map dimensions. It also supports fetching bounds without
reading the entire file. (#1819)
- ``readers.mbio`` added ``datatype`` option to support reading
sidescan data. (#1852)
- ``filters.stats`` was computing expensive kurtosis and skewness
statistics by default. These statistics are now available with the
``advanced`` option. (#1878)
- Added backtrace support for alpine linux-based Docker containers.
(#1904)
- Added a ``condition`` option for ``filters.assign`` to limit
assignment. (#1956)
- Add access to artifact manager keys. (#2026)
- Added support for LAZ compression in ``writers.pgpointcloud`` (#2050)
- Replaced ``last`` option with ``returns`` to support more flexible
segmentation in ``filters.smrf`` and ``filters.pmf``. (#2053)
- ``writers.text`` now supports stream mode. (#2064)
- Added ``pdal tile`` kernel with streaming support to conveniently
tile data. (#2065)
- A KD-tree used in one filter will now be reused in subsequent filters
when possible. (#2123)
- ``writers.ply`` now has a ``precision`` option to specify output
precision. (#2144)
- ``filters.smrf`` and ``filters.pmf`` supports complete range syntax
for the ``ignore`` option. (#2157)
- ``filters.hexbin`` now supports stream mode. (#2170)
- ``readers.numpy`` now has the ``order`` option, which replaces the
previous ``x``, ``y`` and ``z`` options. It also supports structured
numpy arrays and maps values to the X, Y and Z dimensions
accordingly.
- All readers now support setting a spatial reference to override any
in the data with the ``spatialreference`` option.
- Add support for unicode filenames in pipelines on Windows platforms.
- Added NumpyReader::setArray() to support direct setting of a numpy
array into ``readers.numpy``.
- Added StreamPointTable::setNumPoints() and support in
Streamable::execute() allowing custom point tables to know the number
of points in each pass through the point table.
- Added SpatialReference::isProjected() to allow callers to determine
if a spatial reference specifies a projection. Also added
SpatialReference::identifyHorizontalEPSG() and
SpatialReference::identifyVerticalEPSG() to return an EPSG code from
a spatial reference if possible.
- Added support for reading BPF files stored remotely.
New stages
==========
- ``readers.rdb`` - Support reading RIEGL RDB data.
- ``readers.i3s`` - Support reading of web service-style Esri I3S point
clouds.
- ``readers.slpk`` - Support reading of file-based I3S-style point
clouds.
- ``writers.fbx`` - Experimental Unity engine (SDK required) support.
(#2127)
- ``filters.nndistance`` - Replaces ``filters.kdistance`` and adds
average distance support. (#2071)
- ``filters.dem`` - Filter data based on bounds relative to a raster
value. (#2090)
- ``filters.delaunay`` - Create a delauany triangulation of a point
cloud. (#1855)
- ``filters.info`` - Generate metadata about an input point set. Used
by ``pdal info``.
Deprecated stages
=================
- ``filters.kdistance`` - Replaced by ``filters.nndistance``.
Bug fixes
=========
- Don't write LAS GeoTIFF VLRs if they contain no data (#1914)
- Centroid computation should use doubles instead of floats (#1919)
- Fixup `-Werror`-related warnings (#1915)
- Fix linking to libdl for dlopen (#1902)
- BPF doesn't build with ZLIB (#1929)
- Packaging improvements (#1942, #1976, #1980, #1943)
- Explicitly allow underscores and capital letters in stage names
(implicit pre-1.7, hardened to disallow in 1.7.1) (#1923)
- Warn about auto scaling ``writers.las`` in stream mode (#1940)
- Handle cr/lf endings in Windows for ``readers.text`` (#1939 )
- Make ``pdal-config`` owner writeable for `Conda packaging <https://github.com/conda/conda-build/issues/2824#issuecomment-382776831>`__ (#1964)
- Allow replacement of artifacts (#1994)
- Fixed problem with UTM calculation for southern zones (#1989)
- Fixed issue with kernel plugins failing to load (#1971)
- Fixed problem where ``filters.ferry`` would create dimensions with
bad types (#1930)
- Fixed an incorrect error message suggesting there were multiple SRSs
in some cases when reading multiple inputs. (#2009)
- Fixed a problem in ``filters.reprojection`` in stream mode that would
improperly reproject when there were multiple input sources with
differing SRSs. (#2058)
- Fixed a problem in stream mode where a stage with no SRS would
override the active SRS during processing. (#2069)
- Fixed a problem in ``writers.gdal`` where output would be aggregated
if multiple inputs were provided. (#2074)
- The ``count`` option was not respected in stream mode. It now
properly limits the number of points read. (#2086)
- Fixed an off-by-one error that could create improper values in
``writers.gdal``. Most data differences were small and not usually
problematic. (#2095)
- Multiple option values can be specified on the command line by
repeating the option assignment. (#2114)
- Added a missing initialization in ``filters.returns`` that could
cause more point views to be returned than requested. (#2115)
- Emit an error if the ``count`` option isn’t set for ``readers.faux``.
(#2128)
- PipelineManager::getStage() now returns a proper leaf node. (#2149)
- Fixed logic for ``filters.crop`` in streaming mode with multiple crop
areas that could return too few points. (#2198)
- Added the ``minimal`` option for ``readers.rxp`` that was documented
but not fully implemented. (#2225)
- Fixed an error in failing to read all points in ``readers.rxp``
exposed with a newer SDK. (#2226)
- Fixed an error in fetching floating point data from a PointContainer
when the value was NaN. (#2239)
================================================================================
1.7.0
......
#!/bin/sh
prefix=/usr/local
exec_prefix=/usr/local/bin
libdir=/usr/local/lib
usage()
{
cat <<EOF
Usage: pdal-config [OPTIONS]
Options:
[--cflags]
[--cxxflags]
[--defines]
[--includes]
[--libs]
[--plugin-dir]
[--version]
[--python-version]
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
case $1 in
--libs)
echo -L/usr/local/lib -lpdalcpp
;;
--plugin-dir)
echo /usr/local/lib
;;
--prefix)
echo ${prefix}
;;
--ldflags)
echo -L${libdir}
;;
--defines)
echo
;;
--includes)
echo -I/usr/local/include -I/usr/include/gdal -I/usr/include/libxml2 -I/usr/include -I/usr/include
;;
--cflags)
echo
;;
--cxxflags)
echo -std=c++11
;;
--version)
echo 1.7.2
;;
--python-version)
echo
;;
*)
usage 1 1>&2
;;
esac
......@@ -38,6 +38,7 @@
#include <pdal/PluginManager.hpp>
#include <pdal/StageFactory.hpp>
#include <pdal/pdal_config.hpp>
#include <pdal/util/Backtrace.hpp>
#include <iomanip>
#include <iostream>
......
......@@ -41,8 +41,10 @@ install:
- call %OSGEO4W_ROOT%\bin\py3_env.bat
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
- set PATH=%PATH%;C:\Program Files (x86)\CMake\bin
- ps: (new-object net.webclient).DownloadFile("http://curl.haxx.se/ca/cacert.pem", "c:\osgeo4w64\bin\curl-ca-bundle.crt")
- call scripts\\appveyor\\config.cmd
build_script:
- call scripts\\appveyor\\build.cmd
......
#!/bin/bash
# Clean stuff up
find . -name cmake_install.cmake -exec rm {} \;
find . -name CMakeCache.txt -exec rm {} \;
find . -name CMakeFiles -exec rm -rf {} \;
mkdir build
cd build
cmake -G "NMake Makefiles" ^
-DCMAKE_INSTALL_PREFIX:PATH="%CONDA_PREFIX%" ^
-DCMAKE_BUILD_TYPE:STRING=Release ^
-DBUILD_PLUGIN_GREYHOUND=ON ^
-DBUILD_PLUGIN_PCL=ON ^
-DBUILD_PLUGIN_PYTHON=ON ^
-DBUILD_PLUGIN_PGPOINTCLOUD=ON ^
-DBUILD_PLUGIN_SQLITE=ON ^
-DBUILD_PLUGIN_ICEBRIDGE=ON ^
-DBUILD_PLUGIN_NITF=ON ^
-DENABLE_CTEST=OFF ^
-DWITH_TESTS=OFF ^
-DWITH_ZLIB=ON ^
-DWITH_LAZPERF=ON ^
-DWITH_LASZIP=ON ^
..
USR_LOCAL="/usr/local"
USR="/usr"
TIFF_HOME=$USR_LOCAL
LIBXML2_HOME=/usr/local/Cellar/libxml2/2.9.7/
WEBSOCKETPP_HOME=/Users/hobu/dev/git/websocketpp
SQLITE_HOME="/usr/local/opt/sqlite"
SO_EXT=dylib
#CC=/usr/local/bin/gcc-5
#CXX=/usr/local/bin/g++-5
ORACLE_HOME=$HOME/oracle
LAZPERF_HOME=$USR_LOCAL
export ORACLE_HOME
MATLAB_HOME=/Applications/MATLAB_R2017b.app
export GDAL_HOME=/usr/local/opt/gdal2
CONFIG="Unix Makefiles"
CONFIG="Ninja"
if ! [ -z "$1" ]; then
CONFIG="$1"
fi
CC=$CC CXX=$CXX cmake -G "$CONFIG" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/Users/hobu/pdal-build \
-DBUILD_PLUGIN_OCI=ON \
-DBUILD_PLUGIN_SQLITE=ON \
-DBUILD_PLUGIN_PGPOINTCLOUD=ON \
-DBUILD_OCI_TESTS=ON \
-DBUILD_I3S_TESTS=ON \
-DBUILD_PLUGIN_NITF=ON \
-DBUILD_PLUGIN_PYTHON=ON \
-DBUILD_PLUGIN_MRSID=ON \
-DBUILD_PLUGIN_MBIO=ON \
-DBUILD_PLUGIN_CPD=OFF \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_PCL=ON \
-DBUILD_PLUGIN_GREYHOUND=ON \
-DBUILD_PLUGIN_I3S=ON \
-DBUILD_PLUGIN_RDBLIB=OFF \
-DBUILD_PLUGIN_OPENSCENEGRAPH=OFF \
-DWITH_LAZPERF=ON \
-DWITH_LASZIP=ON \
-DWITH_EXAMPLES=ON \
-Drdb_DIR=/Users/hobu/dev/release/riegl/rdblib-2.1.5-x86_64-darwin/interface/cpp \
-DMRSID_INCLUDE_DIR=/Users/hobu/dev/release/mrsid/Lidar_DSDK/include \
-DMRSID_LIBRARY=/Users/hobu/dev/release/mrsid/Lidar_DSDK/lib/liblti_lidar_dsdk.dylib \
-DLIBXML2_INCLUDE_DIR=${LIBXML2_HOME}/include/libxml2 \
-DLIBXML2_LIBRARIES=${LIBXML2_HOME}/lib/libxml2.${SO_EXT} \
-DLazperf_DIR=${LAZPERF_HOME}/ \
-DSQLITE3_INCLUDE_DIR=${SQLITE_HOME}/include \
-DSQLITE3_LIBRARY=${SQLITE_HOME}/lib/libsqlite3.${SO_EXT} \
-DPYTHON_EXECUTABLE=/usr/local/bin/python2 \
-DPYTHON_LIBRARY=/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m/ \
-DOCI_CONNECTION="lidar/lidar@localhost:1521/xe.oracle.docker" \
-DPGPOINTCLOUD_TEST_DB_HOST="localhost"
# -DBUILD_PLUGIN_MATLAB=ON \
# -DMATLAB_MEX_LIBRARY=/Applications/MATLAB_R2017b.app/bin/maci64/libmex.dylib \
# -DMATLAB_MAT_LIBRARY=/Applications/MATLAB_R2017b.app/bin/maci64/libmat.dylib \
# -DMATLAB_MX_LIBRARY=/Applications/MATLAB_R2017b.app/bin/maci64/libmx.dylib \
# -DMATLAB_INCLUDE_DIR=/Applications/MATLAB_R2017b.app/extern/include \
# -DMATLAB_ENG_LIBRARY=/Applications/MATLAB_R2017b.app/bin/maci64/libeng.dylib
# -DPYTHON_EXECUTABLE=/usr/local/bin/python \
# -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
# -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/include/python2.7/ \
# -DPYTHON_EXECUTABLE=/usr/local/bin/python3 \
# -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib \
# -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/include/python3.4m/ \
@echo off
:: This configure script is designed for the default Windows world, which means
:: you have OSGeo4W installed, including Oracle and GDAL and LASzip.
:: This configure script expects to be run from the PDAL root directory.
:: Pick your CMake GENERATOR. (NMake will pick up architecture (x32, x64) from your environment)
set GENERATOR="NMake Makefiles"
REM set GENERATOR="Ninja"
REM set GENERATOR="Visual Studio 14 Win64"
:: Pick your build type
set BUILD_TYPE=Release
REM set BUILD_TYPE=Debug
:: Where is your PDAL build tree?
set PDAL_DIR=.
:: Where is your OSGeo4W installed (recommended basic way to satisfy dependent libs)
set OSGEO4W_DIR=C:\OSGeo4W64
:: GDAL
set GDAL_ENABLED=ON
set GDAL_INCLUDE_DIR=%OSGEO4W_DIR%\include
set GDAL_LIBRARY=%OSGEO4W_DIR%\lib\gdal_i.lib
:: LIBTIFF
set TIFF_ENABLED=ON
set TIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include
set TIFF_LIBRARY=%OSGEO4W_DIR%\lib\libtiff_i.lib
:: GeoTIFF
set GEOTIFF_ENABLED=ON
set GEOTIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include
set GEOTIFF_LIBRARY=%OSGEO4W_DIR%\lib\geotiff_i.lib
:: LASZIP
set LASZIP_ENABLED=ON
set LASZIP_INCLUDE_DIR=%OSGEO4W_DIR%\include
set LASZIP_LIBRARY=%OSGEO4W_DIR%\lib\laszip.lib
:: Oracle
set ORACLE_ENABLED=ON
set ORACLE_HOME=%OSGEO4W_DIR%
set ORACLE_INCLUDE_DIR=%ORACLE_HOME%\include
set ORACLE_OCI_LIBRARY=%ORACLE_HOME%\lib\oci.lib
:: LibXML2
set LIBXML2_INCLUDE_DIR=%OSGEO4W_DIR%\include
set LIBXML2_LIBRARIES=%OSGEO4W_DIR%\lib\libxml2.lib
:: Python
set PYTHON_ENABLED=ON
set PYTHON_EXECUTABLE=%OSGEO4W_DIR\bin\python36.exe
set PYTHON_INCLUDE_DIR=%OSGEO4W_DIR\apps\python36\include
set PYTHON_LIBRARY=%OSGEO4W_DIR\apps\python36\libs\python36.lib
:: CURL
set CURL_INCLUDE_DIR=%OSGEO4W_DIR%\include
set CURL_LIBRARY=%OSGEO4W_DIR%\lib\libcurl.lib
if EXIST CMakeCache.txt del CMakeCache.txt
cmake -G %GENERATOR% ^
-DBUILD_PLUGIN_CPD=OFF ^
-DBUILD_PLUGIN_GREYHOUND=ON ^
-DBUILD_PLUGIN_ICEBRIDGE=OFF ^
-DBUILD_PLUGIN_MRSID=OFF ^
-DBUILD_PLUGIN_NITF=ON ^
-DBUILD_PLUGIN_OCI=ON ^
-DBUILD_PLUGIN_PCL=OFF ^
-DBUILD_PLUGIN_PGPOINTCLOUD=ON ^
-DBUILD_PLUGIN_SQLITE=ON ^
-DBUILD_PLUGIN_I3S=ON ^
-DBUILD_PLUGIN_RIVLIB=OFF ^
-DBUILD_PLUGIN_PYTHON=ON ^
-DENABLE_CTEST=OFF ^
-DWITH_LAZPERF=ON ^
-DLazperf_DIR=%OSGEO4W_DIR%/cmake ^
-DWITH_LASZIP=ON ^
-DWITH_TESTS=ON ^
-DPYTHON_EXECUTABLE=%OSGEO4W_DIR%\apps\python37\python.exe ^
-DLIBLZMA_LIBRARY=%OSGEO4W_DIR%\lib\liblzma.lib ^
-DPYTHON_INCLUDE_DIR=%OSGEO4W_DIR%\apps\python36\include ^
-DPYTHON_LIBRARY=%OSGEO4W_DIR%\apps\python37\libs\python37.lib ^
-DPYTHON_DEBUG_LIBRARY=%OSGEO4W_DIR%\apps\python37\libs\python37.lib ^
-DCURL_INCLUDE_DIR=%CURL_INCLUDE_DIR% ^
-DCURL_LIBRARY=%CURL_LIBRARY% ^
-DNUMPY_INCLUDE_DIR=%OSGEO4W_DIR%\apps\python37\lib\site-packages\numpy\core\include ^
-Dgtest_force_shared_crt=ON ^
-DCMAKE_INSTALL_PREFIX=c:\OSGeo4W64\ ^
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
-DCMAKE_VERBOSE_MAKEFILE=OFF ^
.
#
# See if we have an execinfo library.
# Unwind
#
find_library(EXECINFO_LIBRARIES execinfo)
if (EXECINFO_LIBRARIES)
set(EXECINFO_LIBRARY ${EXECINFO_LIBRARIES})
endif()
find_package(Libexecinfo QUIET)
......@@ -12,6 +12,11 @@ mark_as_advanced(CLEAR LIBXML2_INCLUDE_DIR)
mark_as_advanced(CLEAR LIBXML2_LIBRARIES)
if (LIBXML2_FOUND)
set(PDAL_HAVE_LIBXML2 1)
else()
unset(LIBXML2_INCLUDE_DIR CACHE)
unset(LIBXML2_LIBRARY CACHE)
unset(LIBXML2_XMLLINT_EXECUTABLE CACHE)
unset(LIBXML2_LIBRARIES) # Find-module output variable, not cache variable
endif()
set_property(GLOBAL PROPERTY _LIBXML2_INCLUDED TRUE)
......@@ -76,11 +76,14 @@ macro(PDAL_ADD_FREE_LIBRARY _name _library_type)
${PDAL_INCLUDE_DIR})
pdal_target_compile_settings(${_name})
# Don't install static libraries - they're already built into libpdalXXX
if (NOT ${_library_type} STREQUAL "STATIC")
install(TARGETS ${_name}
EXPORT PDALTargets
RUNTIME DESTINATION ${PDAL_BIN_INSTALL_DIR}
LIBRARY DESTINATION ${PDAL_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${PDAL_LIB_INSTALL_DIR})
endif()
endmacro(PDAL_ADD_FREE_LIBRARY)
###############################################################################
......@@ -102,7 +105,7 @@ endmacro(PDAL_ADD_EXECUTABLE)
# Add a plugin target.
# _name The plugin name.
# ARGN :
# FILES the srouce files for the plugin
# FILES the source files for the plugin
# LINK_WITH link plugin with libraries
#
# The "generate_dimension_hpp" ensures that Dimension.hpp is built before
......@@ -132,7 +135,7 @@ macro(PDAL_ADD_PLUGIN _name _type _shortname)
${PROJECT_BINARY_DIR}/include
${PDAL_INCLUDE_DIR})
target_link_libraries(${${_name}}
PUBLIC
PRIVATE
${PDAL_BASE_LIB_NAME}
${PDAL_UTIL_LIB_NAME}
${PDAL_ADD_PLUGIN_LINK_WITH}
......@@ -151,7 +154,7 @@ macro(PDAL_ADD_PLUGIN _name _type _shortname)
ARCHIVE DESTINATION ${PDAL_LIB_INSTALL_DIR})
if (APPLE)
set_target_properties(${${_name}} PROPERTIES
INSTALL_NAME_DIR "@loader_path/../lib")
INSTALL_NAME_DIR "@rpath")
endif()
endmacro(PDAL_ADD_PLUGIN)
......
###############################################################################
#
# OSGeo4W packaging
#
###############################################################################
set(OSGEO4W_DIR osgeo4w)
set(OSGEO4W_LIB_DIR ${OSGEO4W_DIR}/lib)
set(OSGEO4W_ETC_DIR ${OSGEO4W_DIR}/etc)
set(OSGEO4W_ETC_INI_DIR ${OSGEO4W_DIR}/etc/ini)
set(OSGEO4W_ETC_POSTINSTALL_DIR ${OSGEO4W_DIR}/etc/postinstall)
set(OSGEO4W_LIB_BIN_DIR ${OSGEO4W_DIR}/lib/bin)
set(OSGEO4W_BIN_DIR ${OSGEO4W_DIR}/bin)
set(OSGEO4W_DEVEL_DIR ${OSGEO4W_DIR}/devel)
set(OSGEO4W_DEVEL_INCLUDE_DIR ${OSGEO4W_DEVEL_DIR}/include)
set(OSGEO4W_DEVEL_INCLUDE_LIBLAS_DIR ${OSGEO4W_DEVEL_INCLUDE_DIR}/liblas)
set(OSGEO4W_DEVEL_LIB_DIR ${OSGEO4W_DEVEL_DIR}/lib)
set(OSGEO4W_DEVEL_BIN_DIR ${OSGEO4W_DEVEL_DIR}/bin)
set(OSGEO4W_PYTHON_DIR ${OSGEO4W_DIR}/apps/python25/lib/site-packages/liblas)
set(OSGEO4W_PACKAGES ${OSGEO4W_DIR}/packages)
set(OSGEO4W_DIRECTORIES
${OSGEO4W_DIR}
${OSGEO4W_ETC_DIR}
${OSGEO4W_ETC_INI_DIR}
${OSGEO4W_ETC_POSTINSTALL_DIR}
${OSGEO4W_LIB_DIR}
${OSGEO4W_LIB_BIN_DIR}
${OSGEO4W_DEVEL_DIR}
${OSGEO4W_DEVEL_INCLUDE_DIR}
${OSGEO4W_DEVEL_INCLUDE_LIBLAS_DIR}
${OSGEO4W_DEVEL_LIB_DIR}
${OSGEO4W_PYTHON_DIR}
${OSGEO4W_DEVEL_BIN_DIR}
${OSGEO4W_PACKAGES}
${OSGEO4W_BIN_DIR})
add_custom_target(make_osgeo4w_directories
COMMAND ${CMAKE_COMMAND} -E echo "Building OSGeo4W install directories")
foreach(utility ${LIBLAS_UTILITIES})
add_dependencies( make_osgeo4w_directories ${utility} )
endforeach()
macro (make_directories)
add_custom_command(
TARGET make_osgeo4w_directories
COMMAND ${CMAKE_COMMAND} -E remove_directory ${libLAS_SOURCE_DIR}/osgeo4w DEPENDS osgeo4w
)
foreach(directory ${OSGEO4W_DIRECTORIES})
STRING(REGEX REPLACE "/" "_" target "${directory}" )
add_custom_command(
TARGET make_osgeo4w_directories
COMMAND ${CMAKE_COMMAND} -E make_directory ${directory}
)
endforeach()
endmacro(make_directories)
add_custom_target(copy ALL COMMENT "Copying OSGeo4W files")
add_dependencies( copy make_osgeo4w_directories )
macro(copy_files GLOBPAT DESTINATION )
file(GLOB_RECURSE COPY_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${GLOBPAT})
foreach(FILENAME ${COPY_FILES})
set(SRC "${FILENAME}")
set(DST "${DESTINATION}")
add_custom_command(
TARGET copy
COMMAND ${CMAKE_COMMAND} -E copy ${SRC} ${DST}
)
endforeach(FILENAME)
endmacro(copy_files)
macro(copy_directory SOURCE DESTINATION )
add_custom_command(
TARGET copy
COMMAND ${CMAKE_COMMAND} -E copy_directory ${SOURCE} ${DESTINATION}
)
endmacro(copy_directory)
add_custom_target(tar
COMMAND ${CMAKE_COMMAND} -E echo "Tarring OSGeo4W install")
add_dependencies( tar copy )
macro (tar_directories source destination base_paths)
add_custom_command(
TARGET tar
COMMAND ${CMAKE_COMMAND} -E chdir ${source} cmake -E tar cjf ${destination} ${base_paths}
)
endmacro(tar_directories)
make_directories()
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/lasinfo.exe ${OSGEO4W_BIN_DIR}/lasinfo.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/lasinfo-old.exe ${OSGEO4W_BIN_DIR}/lasinfo-old.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/las2las.exe ${OSGEO4W_BIN_DIR}/las2las.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/las2las-old.exe ${OSGEO4W_BIN_DIR}/las2las-old.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/las2ogr.exe ${OSGEO4W_BIN_DIR}/las2ogr.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/las2oci.exe ${OSGEO4W_BIN_DIR}/las2oci.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/las2txt.exe ${OSGEO4W_BIN_DIR}/las2txt.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/las2txt-old.exe ${OSGEO4W_BIN_DIR}/las2txt-old.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/lasblock.exe ${OSGEO4W_BIN_DIR}/lasblock.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/lasmerge.exe ${OSGEO4W_BIN_DIR}/lasmerge.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/txt2las.exe ${OSGEO4W_BIN_DIR}/txt2las.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/ts2las.exe ${OSGEO4W_BIN_DIR}/ts2las.exe )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas_c.dll ${OSGEO4W_BIN_DIR}/ )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas.dll ${OSGEO4W_BIN_DIR}/ )
copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-start.bat.tmpl ${OSGEO4W_BIN_DIR}/liblas.bat.tmpl )
copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-init.bat ${OSGEO4W_ETC_INI_DIR}/liblas.bat )
copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-postinstall.bat ${OSGEO4W_ETC_POSTINSTALL_DIR}/liblas.bat )
copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas.lib ${OSGEO4W_DEVEL_LIB_DIR}/ )
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}/ )
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)
tar_directories(${OSGEO4W_DIR}/devel ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-devel-${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}-${OSGEO4W_UPSTREAM_RELEASE}.tar.bz2 "lib/;include")
add_custom_target(osgeo4w
COMMAND ${CMAKE_COMMAND} -E echo "Making OSGeo4W build")
add_dependencies( osgeo4w tar )
......@@ -92,12 +92,9 @@ SET(GDAL_NAMES gdal)
IF(WIN32)
SET(OSGEO4W_IMPORT_LIBRARY gdal_i)
IF(DEFINED ENV{OSGEO4W_ROOT})
SET(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT})
#MESSAGE(STATUS " FindGDAL: trying OSGeo4W using environment variable OSGEO4W_ROOT=$ENV{OSGEO4W_ROOT}")
ELSE()
SET(OSGEO4W_ROOT_DIR c:/OSGeo4W)
#MESSAGE(STATUS " FindGDAL: trying OSGeo4W using default location OSGEO4W_ROOT=${OSGEO4W_ROOT_DIR}")
IF(DEFINED ENV{OSGEO4W_HOME})
SET(OSGEO4W_INCLUDE_DIR $ENV{OSGEO4W_ROOT}/include)
SET(OSGEO4W_LIB_DIR $ENV{OSGEO4W_ROOT}/lib)
ENDIF()
IF(MINGW)
......@@ -108,7 +105,7 @@ IF(WIN32)
/usr/local/include
/usr/include
c:/msys/local/include
${OSGEO4W_ROOT_DIR}/include)
${OSGEO4W_INCLUDE_DIR})
FIND_LIBRARY(GDAL_LIBRARY
NAMES ${GDAL_NAMES}
......@@ -117,29 +114,26 @@ IF(WIN32)
/usr/local/lib
/usr/lib
c:/msys/local/lib
${OSGEO4W_ROOT_DIR}/lib)
${OSGEO4W_LIB_DIR})
ENDIF(MINGW)
IF(MSVC)
FIND_PATH(GDAL_INCLUDE_DIR
NAMES gdal.h
PATH_PREFIXES gdal gdal-1.6
PATH_PREFIXES gdal
PATHS
"${OSGEO4W_ROOT_DIR}/apps/gdal-dev/include"
"$ENV{LIB_DIR}/include/gdal"
${OSGEO4W_ROOT_DIR}/include)
"${OSGEO4W_INCLUDE_DIR}"
"$ENV{LIB_DIR}/include/gdal")
SET(GDAL_NAMES ${OSGEO4W_IMPORT_LIBRARY} ${GDAL_NAMES})
FIND_LIBRARY(GDAL_LIBRARY
NAMES ${GDAL_NAMES}
PATH_PREFIXES gdal gdal-1.6
PATH_PREFIXES gdal
PATHS
"$ENV{LIB_DIR}/lib"
/usr/lib
c:/msys/local/lib
"${OSGEO4W_ROOT_DIR}/apps/gdal-dev/lib"
${OSGEO4W_ROOT_DIR}/lib)
"${OSGEO4W_LIB_DIR}")
IF(GDAL_LIBRARY)
SET(GDAL_LIBRARY;odbc32;odbccp32 CACHE STRING INTERNAL)
......@@ -175,7 +169,6 @@ ELSEIF(UNIX)
HINTS
${GDAL_CONFIG_PREFER_PATH}
${GDAL_CONFIG_PREFER_OSGEO4W_PATH}
${GDAL_CONFIG_PREFER_FWTOOLS_PATH}
${GDAL_MAC_PATH}
/usr/local/bin/
/usr/bin/)
......