Skip to content
Commits on Source (20)
......@@ -15,7 +15,7 @@ script:
after_success: |
if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" &&
"$TRAVIS_BRANCH" == "1.9-maintenance" &&
"$TRAVIS_BRANCH" == "2.0-maintenance" &&
-n "$encrypted_6a5172b96922_key" ]]
then
cd scripts/ci
......
......@@ -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.9.1" CACHE STRING "PDAL version")
set(PDAL_VERSION_STRING "2.0.1" CACHE STRING "PDAL version")
DISSECT_VERSION()
GET_OS_INFO()
SET_INSTALL_DIRS()
set(PDAL_API_VERSION "8")
set(PDAL_BUILD_VERSION "9.0.1")
set(PDAL_API_VERSION "9")
set(PDAL_BUILD_VERSION "10")
# Name of C++ library
......@@ -124,10 +124,11 @@ include(${PDAL_CMAKE_DIR}/lzma.cmake)
include(${PDAL_CMAKE_DIR}/zstd.cmake)
include(${PDAL_CMAKE_DIR}/test.cmake)
include(${PDAL_CMAKE_DIR}/ctest.cmake)
include(${PDAL_CMAKE_DIR}/json.cmake)
include(${PDAL_CMAKE_DIR}/libxml2.cmake)
include(${PDAL_CMAKE_DIR}/dimension.cmake)
include(${PDAL_CMAKE_DIR}/arbiter.cmake)
include(${PDAL_CMAKE_DIR}/nlohmann.cmake)
include(${PDAL_CMAKE_DIR}/openssl.cmake) # Optional
#------------------------------------------------------------------------------
# generate the pdal_features.hpp header
......@@ -176,9 +177,6 @@ add_subdirectory(dimbuilder)
add_subdirectory(vendor/pdalboost)
add_subdirectory(vendor/arbiter)
add_subdirectory(vendor/kazhdan)
if (NOT PDAL_HAVE_JSONCPP)
add_subdirectory(vendor/jsoncpp/dist)
endif()
add_subdirectory(pdal/util)
add_subdirectory(tools)
add_subdirectory(apps)
......@@ -242,6 +240,11 @@ if (NOT PDAL_HAVE_LAZPERF)
${PDAL_SRC_DIR}/compression/LazPerfVlrCompression.cpp)
list(REMOVE_ITEM SRCS ${LAZPERF_SRCS})
endif()
if (GDAL_VERSION VERSION_LESS 3.0.0)
file(GLOB PROJPIPELINE_FILTER_SRCS
${PDAL_FILTERS_DIR}/ProjPipelineFilter.cpp)
list(REMOVE_ITEM SRCS ${PROJPIPELINE_FILTER_SRCS})
endif()
PDAL_ADD_LIBRARY(${PDAL_BASE_LIB_NAME} ${SRCS} ${RPLY_SRCS})
#
......@@ -255,9 +258,9 @@ target_include_directories(${PDAL_BASE_LIB_NAME}
${PDAL_VENDOR_DIR}
${PDAL_VENDOR_DIR}/eigen
${PDAL_VENDOR_DIR}/pdalboost
${PDAL_JSONCPP_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${ZSTD_INCLUDE_DIRS}
${NLOHMANN_INCLUDE_DIR}
PUBLIC
${GDAL_INCLUDE_DIR}
${LASZIP_INCLUDE_DIR}
......@@ -277,7 +280,6 @@ target_link_libraries(${PDAL_BASE_LIB_NAME}
${PDAL_UTIL_LIB_NAME}
${PDAL_ARBITER_LIB_NAME}
${PDAL_KAZHDAN_LIB_NAME}
${PDAL_JSONCPP_LIB_NAME}
INTERFACE
${PDAL_LIBDIR}
)
......@@ -332,7 +334,10 @@ install(DIRECTORY ${PDAL_INCLUDE_DIR}/pdal
FILES_MATCHING PATTERN "*.hpp"
PATTERN "gitsha.h"
PATTERN "pdal/private" EXCLUDE
PATTERN "pdal/io/private" EXCLUDE
PATTERN "pdal/pdal/private" EXCLUDE
PATTERN "pdal/util/private" EXCLUDE
PATTERN "pdal/filters/private" EXCLUDE
${ZSTD_EXCLUDES}
${ZLIB_EXCLUDES}
${LZMA_EXCLUDES}
......
......@@ -26,23 +26,19 @@ Release Process
set(PDAL_BUILD_VERSION "1.0.0")
* https://github.com/libspatialindex/libspatialindex/pull/44#issuecomment-57088783
- doc/quickstart.rst has a number of current-release references
- doc/download.rst point to new release
- appveyor.yml
- Make and push new release branch
::
git branch 1.8-maintenance
git push origin 1.8-maintenance
git branch 2.0-maintenance
git push origin 2.0-maintenance
- Increment the doc build branch of .travis.yml:
"$TRAVIS_BRANCH" = "1.8-maintenance"
"$TRAVIS_BRANCH" = "2.0-maintenance"
- Make DockerHub build entry for new release branch.
......@@ -92,23 +88,10 @@ Release Process
6) Update docs/download.txt to point at the location of the new release
7) Upload the new release to download.osgeo.org:/osgeo/download/pdal
::
scp PDAL-* hobu@download.osgeo.org:/osgeo/download/pdal
8) Tag the release. Use the ``-f`` switch if you are retagging because you
missed something.
7) Write the release notes. Email PDAL mailing list with notice about release
::
git tag 1.0.0
git push --tags
9) Write the release notes. Email PDAL mailing list with notice about release
10) Update Alpine package
8) Update Alpine package
- The PDAL Alpine package lives at
https://github.com/alpinelinux/aports/blob/master/testing/pdal/APKBUILD.
......@@ -119,7 +102,7 @@ Release Process
- Pull requests should have a commit message of the following form
`testing/pdal: <description>`.
11) Update Conda package
9) 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
......@@ -132,8 +115,3 @@ Release Process
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.
12) Mint a new Zenodo DOI. Each new GitHub release should trigger a new release
in Zenodo. Just follow the instructions at
https://guides.github.com/activities/citable-code/ to publish the new
version and update the DOI for the new releae.
......@@ -17,11 +17,6 @@ endforeach(_dir)
include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake")
if (WIN32)
# On windows link in pdal_util as well
set(PDAL_LIBRARIES "@PDAL_LIB_NAME@" "@PDAL_UTIL_LIB_NAME@")
else (WIN32)
set(PDAL_LIBRARIES "@PDAL_LIB_NAME@")
endif(WIN32)
set(PDAL_LIBRARIES @PDAL_BASE_LIB_NAME@ @PDAL_UTIL_LIB_NAME@)
check_required_components(PDAL)
================================================================================
2.0.0
================================================================================
Changes of Note
===============
- Python support now requires at least version 3.5+ of Python and
version 1.13 of Numpy.
- ``filters.icp`` is no longer a plugin and provides options not
previously available.
- Linear algebra that was using single-precision math is now using
double-precision math.
- Support was added for GDAL version 3+.
- PCL support has been removed. PCD read/write and ``filters.icp`` is
now natively supported. The PCL filters have been moved to the
`unsupported-plugins <https://github.com/PDAL/unsuppported-plugins>`__
repository for those that might need functionality they provided.
- PDAL now uses a JSON library that doesn’t support comments. If your
pipelines contains non-standard JSON, they will no longer be
accepted.
- PDAL now supports GCC 9.2, clang 8.0.1 and Visual Studio 17
New Stages
==========
- ``filters.covariancefeatures`` computes statistics about features of
points in a neighborhood. (#2455 - Thanks
`Helix.re <http://https://helixre.com/>`__!)
- ``readers.e57`` reads the E57 format. (#2442 - Thanks
`Helix.re <http://https://helixre.com/>`__!)
- ``writers.e57`` writes the E57 format. (#2442 - Thanks
`Helix.re <http://https://helixre.com/>`__!)
- ``writers.gltf`` provides simple glTF mesh output support. (#2643)
- ``filters.reciprocity`` computes the percentage of points that are
considered uni-directional. (#2504 - @chambbj)
- ``filters.miniball`` computes a criterion for neighbors based on the
miniball algorithm. (#2504 - @chambbj)
- ``filters.planefit`` computes a deviation of a point from a manifold
approximating its neighbors. (#2504 - @chambbj)
- ``readers.memory`` provides an API interface for direct reading of
row-oriented point data. (#2620)
- ``filters.projpipeline`` processes point through a `PROJ
pipeline <https://proj.org/operations/transformations/deformation.html>`__.
(#2626 - Thanks @vilaa!)
Deprecated Stages
=================
- readers.sqlite (will be moved to
`unsupported-plugins <https://github.com/PDAL/unsuppported-plugins>`__
in a future release)
- writers.sqlite (will be moved to
`unsupported-plugins <https://github.com/PDAL/unsuppported-plugins>`__
in a future release)
- readers.geowave (will be moved to
`unsupported-plugins <https://github.com/PDAL/unsuppported-plugins>`__
in a future release)
- writers.geowave (will be moved to
`unsupported-plugins <https://github.com/PDAL/unsuppported-plugins>`__
in a future release)
Removed Stages
==============
- ``filters.mongus``
- ``filters.kdistance``
- ``readers.greyhound``
Enhancements
============
- ``readers.mrsid`` now supports more recent versions of the Mr. Sid
SDK. (#2460)
- ``readers.tiledb`` and ``writers.tiledb`` now support stream mode
processing. It also supports an ``append`` option.
- ``readers.ept`` now accepts an optional ``\<spatial reference>``
after the bounds specification in the ``bounds`` option to indicate
the SRS of the provided boundary. (#2295)
- ``filters.hag`` now supports interpolation from a TIN (triangulated
network) of points. (#2520 - Thanks `James
McClain <https://github.com/jamesmcclain>`__!)
- ``filters.poisson`` now properly applies an inverse transform to
points it creates. (#1840)
- ``pdal --drivers`` now shows the file extensions associated with each
driver. It also shows when stages are streamable. (#2571, #2528)
- Some threaded execution has been added to ``readers.ept``.
- Alternate dimension names have been added for “Red”, “Green” and
“Blue” to better support PLY input. (#2570)
Bug Fixes
=========
- Fixed a problem where data in a forwarded LAS VLR would be lost.
(#2542)
- Clear dimension list in ``filters.colorization`` to eliminate the
possibility of writing invalid data. (#2487)
- Delete code that removed control characters when converting to JSON.
(#2355)
- Fixed an issue where nested geometries were being written as invalid
WKT in ``filter.hexbin``. (#2507)
- Fixed a segmentation fault in ``readers.bpf`` if the specified file
didn’t exist. (#2515)
- Fixed an issue in ``writers.gdal`` where interpolation would
terminate if the process hit the raster edge. (#2545)
- Fixed an issue writing JSON when characters needed to be escaped.
(#2558)
- Delaunay triangulation no longer segfaults with fewer than three
points. (#2513)
- Issues with reading binary data with ``filters.ept`` have been fixed.
(#2585)
- ``pdal`` now errors if an option is provided that wasn’t expected.
(#2574)
- Forwarding for scale with multiple LAS inputs was fixed. (#2663)
================================================================================
1.9.1
================================================================================
......@@ -59,46 +174,6 @@ Enhancements
``spatialreference`` option. ``default_srs`` applies only if no
spatial reference exists in the source file. (#2194, #2195)
- Added some dimension detection capability to ``readers.pts``. (#2317)
- Hardened API use of LASzip in ``writers.las`` for points with data
format 6 and above and set the extended_point_type variable. (#2320,
#2329)
- .. rubric:: Changes of Note
:name: changes-of-note-1
- PDAL now requires at least version 2.2 of GDAL.
- Pipelines can optionally be specified as an array of stages (without
an encapsulating “pipeline” object).
- The location of installed cmake files has been changed to match the
cmake convention.
- ``filters.delaunay`` now uses the delaunator library instead of
geogram.
- PDAL no longer depends on the GEOS library. However, some polygon
functions will not work if PDAL isn’t built with a version of the
GDAL library that has GEOS support.
- PDAL now uses the standard cmake script to locate the necessary GDAL
files when building.
- ``readers.sbet`` now reads angles as degrees rather than radians.
(#2354)
- The ``tindex`` command now requires one of the subcommands ``create``
or ``merge``. It no longer accepts the ``merge`` option, which has
been replaced by the ``merge`` subcommand.
- The argument for the function ``PipelineManager::executeStream`` is
now of type ``StreamPointTable&`` instead of ``FixedPointTable&``.
.. _enhancements-1:
Enhancements
============
- All readers now accept the ``default_srs`` and ``override_srs``
options. ``override_srs`` is an alias for the existing
``spatialreference`` option. ``default_srs`` applies only if no
spatial reference exists in the source file. (#2194, #2195)
- Added some dimension detection capability to ``readers.pts``. (#2317)
- The build system now has enhanced conflict detection of mixed python
2/3 installations. Make sure that you have header
files/libraries/interpreter/numpy support for either python 2 or
python 3.
- Hardened API use of LASzip in ``writers.las`` for points with data
format 6 and above and set the extended_point_type variable. (#2320,
#2329)
......@@ -157,69 +232,7 @@ Bug fixes
a crash in some circumstances.
- Generalized the python library re-loaded by PDAL when being used as a
python extension. This is only relevant on some Unix distributions.
- Support the ``libgeotiff`` path suffix when searching for the geotiff
library with cmake.
- Added a ``resolution`` option to ``readers.ept`` to limit the number
of points read. (#2331)
- ``readers.rxp`` now supports stream mode.
- Added the ``invert`` option to ``filters.head`` and ``filters.tail``.
- Added support for subcommands in kernels. (#2293)
- Fixed a bug in ``writers.gdal`` that might access invalid memory in
some situations. (#2448)
.. _new-stages-1:
New stages
==========
- ``filters.mongo`` - Filtering of points using the mongo expression
language.
- ``readers.tiledb`` - Reads points from the tileDB database.
- ``writers.tiledb`` - Writes points to the tileDB database.
- ``writers.ept_addon`` - Adds sidecar data to an existing EPT dataset.
.. _deprecated-stages-1:
Deprecated stages
=================
- ``filters.kdistance`` - Replaced by ``filters.nndistance``.
``filters.kdistance`` will be removed in the next PDAL release.
- ``filters.mongus`` - Replaces by ``filters.pmf`` and ``filters.smrf``
.. _bug-fixes-1:
Bug fixes
=========
- The tindex command now uses sufficient precision when using the
``fast_boundary`` option (#2271)
- ``filters.smrf`` and ``filters.pmf`` now process all points if the
``NumberOfReturns`` or ``ReturnNumber`` dimension is missing. This
fixes a regression introduced with PDAL 1.8. (#2275)
- The density command is now found by pdal. This fixes a regression
introduced with PDAL 1.8. (#2378)
- The ``scale=auto`` and ``offset=auto`` options now work with
``writers.bpf`` in stream mode. (#1983)
- Pipelines with diamond shapes now properly re-execute ancestor
stages. This fixes a regression introduced with PDAL 1.8. (#2290)
- ``filters.crop`` now uses the correct logic when the ``outside``
option is used in standard mode. (#2305)
- A bug in ``writers.gdal`` with streaming mode that caused an improper
location shift in some instances has been fixed. (#2292)
- Added an explicit dependency on the arbiter library for curl. This
fixes build issues on some Unix platforms. (#1822)
- Fixed a bug in ``filters.icp`` introduced by a change in PCL (see:
https://github.com/PointCloudLibrary/pcl/issues/2724) that improperly
removed a function call. (#2319)
- ``readers.tindex`` now provides a default of “EPSG:4326” for the
``filter_srs`` option. (#2316)
- Points in buffer corners are now properly placed in tiles in
``filters.splitter``. (#2372)
- Fixed reference counting in ``filters.python`` that might have caused
a crash in some circumstances.
- Generalized the python library re-loaded by PDAL when being used as a
python extension. This is only relevant on some Unix distributions.
================================================================================
1.8.0
================================================================================
......
......@@ -21,12 +21,11 @@ target_link_libraries(${PDAL_APP}
PRIVATE
${PDAL_BASE_LIB_NAME}
${PDAL_UTIL_LIB_NAME}
${PDAL_JSONCPP_LIB_NAME}
${GDAL_LIBRARY}
${WINSOCK_LIBRARY}
)
target_include_directories(${PDAL_APP} PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${NLOHMANN_INCLUDE_DIR}
${PDAL_INCLUDE_DIR}
${GDAL_INCLUDE_DIR}
${PROJECT_BINARY_DIR}/include)
......
......@@ -47,7 +47,7 @@
#include <string>
#include <vector>
#include <json/json.h>
#include <nlohmann/json.hpp>
#ifndef _WIN32
#include <csignal>
......@@ -160,18 +160,23 @@ void App::outputDrivers()
}
else
{
Json::Value array(Json::arrayValue);
NL::json j;
StageExtensions& extensions = PluginManager<Stage>::extensions();
for (auto name : stages)
{
Stage *s = f.createStage(name);
std::string description = PluginManager<Stage>::description(name);
std::string link = PluginManager<Stage>::link(name);
Json::Value node(Json::objectValue);
node["name"] = name;
node["description"] = description;
node["link"] = link;
array.append(node);
j.push_back(
{ { "name", name },
{ "description", description },
{ "link", link },
{ "extensions", extensions.extensions(name) },
{ "streamable", s->pipelineStreamable() }
}
m_out << array;
);
}
m_out << std::setw(4) << j;
}
}
......@@ -217,15 +222,16 @@ void App::outputOptions(std::string const& stageName, std::ostream& strm)
{
std::ostringstream ostr;
args.dump3(ostr);
std::string json = ostr.str();
Json::Reader jsonReader;
Json::Value array;
Json::Value object(Json::objectValue);
jsonReader.parse(json, array);
object[stageName] = array;
NL::json array;
try
{
array = NL::json::parse(ostr.str());
}
catch (NL::json::parse_error&)
{}
NL::json object = { stageName, array };
strm << object;
}
}
......@@ -248,17 +254,19 @@ void App::outputOptions()
}
else
{
std::ostringstream strm;
Json::Value options (Json::arrayValue);
std::stringstream strm;
NL::json options;
for (auto const& n : nv)
{
outputOptions(n, strm);
std::string json(strm.str());
Json::Reader jsonReader;
Json::Value array;
jsonReader.parse(json, array);
options.append(array);
NL::json j;
try
{
strm >> j;
}
catch (NL::json::parse_error&)
{}
options.push_back(j);
strm.str("");
}
m_out << options;
......@@ -368,6 +376,14 @@ int App::execute(StringList& cmdArgs, LogPtr& log)
return ret;
}
// If we get here, all arguments should be consumed, if not, it's
// an error.
if (cmdArgs.size())
{
Utils::printError("Unexpected argument '" + cmdArgs[0] + "'.");
return -1;
}
if (m_showVersion)
outputVersion();
else if (m_showDrivers)
......
......@@ -4,8 +4,8 @@
include(${PDAL_CMAKE_DIR}/curl.cmake)
set(PDAL_ARBITER_ENABLED 0)
if (CURL_FOUND)
set(PDAL_ARBITER_ENABLED 1)
set(PDAL_ARBITER_LIB_NAME pdal_arbiter)
endif()
......@@ -18,7 +18,7 @@ configure_package_config_file(
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/PDALConfigVersion.cmake
VERSION ${PDAL_VERSION_STRING}
COMPATIBILITY SameMajorVersion)
COMPATIBILITY AnyNewerVersion)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/PDALConfig.cmake
......
......@@ -34,7 +34,6 @@ CC=$CC CXX=$CXX cmake -G "$CONFIG" \
-DBUILD_PLUGIN_MBIO=ON \
-DBUILD_PLUGIN_CPD=OFF \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_PCL=OFF \
-DBUILD_PLUGIN_GREYHOUND=ON \
-DBUILD_PLUGIN_I3S=ON \
-DBUILD_PLUGIN_RDBLIB=ON \
......
......@@ -71,7 +71,6 @@ cmake -G %GENERATOR% ^
-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 ^
......
#
# GDAL/OGR support (required)
#
function(gdal_find_version _version)
file(READ ${GDAL_INCLUDE_DIR}/gdal_version.h versionfile)
string(REGEX MATCH "GDAL_VERSION_MAJOR[\t ]+([0-9]+)" _ ${versionfile})
set(MAJOR ${CMAKE_MATCH_1})
string(REGEX MATCH "GDAL_VERSION_MINOR[\t ]+([0-9]+)" _ ${versionfile})
set(MINOR ${CMAKE_MATCH_1})
string(REGEX MATCH "GDAL_VERSION_REV[\t ]+([0-9]+)" _ ${versionfile})
set(REV ${CMAKE_MATCH_1})
set(${_version} ${MAJOR}.${MINOR}.${REV} PARENT_SCOPE)
endfunction(gdal_find_version)
find_package(GDAL 2.2.0)
set_package_properties(GDAL PROPERTIES TYPE REQUIRED
PURPOSE "Provides general purpose raster, vector, and reference system support")
if (GDAL_FOUND)
gdal_find_version(GDAL_VERSION)
mark_as_advanced(CLEAR GDAL_INCLUDE_DIR)
mark_as_advanced(CLEAR GDAL_LIBRARY)
else()
......
get_property(EXISTS GLOBAL PROPERTY _JSONCPP_INCLUDED)
if(EXISTS)
return()
endif()
find_package(JSONCPP 1.6.2)
set_package_properties(JSONCPP PROPERTIES TYPE OPTIONAL)
if (JSONCPP_FOUND)
set_package_properties(JSONCPP PROPERTIES TYPE OPTIONAL)
mark_as_advanced(CLEAR JSONCPP_INCLUDE_DIR)
mark_as_advanced(CLEAR JSONCPP_LIBRARY)
include_directories(${JSONCPP_INCLUDE_DIR})
set(PDAL_JSONCPP_LIB_NAME ${JSONCPP_LIBRARY})
set(PDAL_JSONCPP_INCLUDE_DIR ${JSONCPP_INCLUDE_DIR})
set(PDAL_HAVE_JSONCPP 1)
else()
unset(JSONCPP_INCLUDE_DIR CACHE)
unset(JSONCPP_LIBRARY CACHE)
unset(JSONCPP_ROOT_DIR CACHE)
set(PDAL_JSONCPP_LIB_NAME pdal_jsoncpp)
set(PDAL_JSONCPP_INCLUDE_DIR ${PDAL_VENDOR_DIR}/jsoncpp/dist)
set(PDAL_JSONCPP_SRC ${PDAL_JSONCPP_INCLUDE_DIR}/jsoncpp.cpp)
endif()
set_property(GLOBAL PROPERTY _JSONCPP_INCLUDED TRUE)
......@@ -9,7 +9,6 @@ if (WITH_LASZIP)
set_package_properties(LASzip PROPERTIES TYPE RECOMMENDED
PURPOSE "Provides LASzip compression")
if(LASZIP_FOUND)
set(CMAKE_REQUIRED_LIBRARIES "${LASZIP_LIBRARY}")
include_directories(${LASZIP_INCLUDE_DIR})
mark_as_advanced(CLEAR LASZIP_INCLUDE_DIR)
mark_as_advanced(CLEAR LASZIP_LIBRARY)
......
......@@ -55,6 +55,9 @@ macro(PDAL_ADD_LIBRARY _name)
target_include_directories(${_name} PRIVATE
${PDAL_INCLUDE_DIR})
pdal_target_compile_settings(${_name})
if (NOT ${_library_type} STREQUAL "STATIC")
target_compile_definitions(${_name} PRIVATE PDAL_DLL_EXPORT)
endif()
install(TARGETS ${_name}
EXPORT PDALTargets
......@@ -78,6 +81,7 @@ macro(PDAL_ADD_FREE_LIBRARY _name _library_type)
# Don't install static libraries - they're already built into libpdalXXX
if (NOT ${_library_type} STREQUAL "STATIC")
target_compile_definitions(${_name} PRIVATE PDAL_DLL_EXPORT)
install(TARGETS ${_name}
EXPORT PDALTargets
RUNTIME DESTINATION ${PDAL_BIN_INSTALL_DIR}
......@@ -137,6 +141,7 @@ macro(PDAL_ADD_PLUGIN _name _type _shortname)
${PDAL_INCLUDE_DIR}
${PDAL_ADD_PLUGIN_INCLUDES}
)
target_compile_definitions(${${_name}} PRIVATE PDAL_DLL_EXPORT)
if (PDAL_ADD_PLUGIN_SYSTEM_INCLUDES)
target_include_directories(${${_name}} SYSTEM PRIVATE
${PDAL_ADD_PLUGIN_SYSTEM_INCLUDES})
......@@ -180,7 +185,6 @@ macro(PDAL_ADD_TEST _name)
cmake_parse_arguments(PDAL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (WIN32)
list(APPEND ${PDAL_ADD_TEST_FILES} ${PDAL_TARGET_OBJECTS})
add_definitions("-DPDAL_DLL_EXPORT=1")
endif()
add_executable(${_name} ${PDAL_ADD_TEST_FILES}
$<TARGET_OBJECTS:${PDAL_TEST_SUPPORT_OBJS}>)
......@@ -221,54 +225,6 @@ macro(PDAL_ADD_TEST _name)
endif()
endmacro(PDAL_ADD_TEST)
###############################################################################
# Add a driver. Creates object library and adds files to source_group for windows IDE.
# _type The driver type (e.g., reader, writer, driver, filter, kernel).
# _name The driver name.
# _srcs The list of source files to add.
# _incs The list of includes to add.
# _objs The object library name that is created.
macro(PDAL_ADD_DRIVER _type _name _srcs _incs _objs)
source_group("Header Files\\${_type}\\${_name}" FILES ${_incs})
source_group("Source Files\\${_type}\\${_name}" FILES ${_srcs})
set(libname ${_type}_${_name})
set(${_objs} $<TARGET_OBJECTS:${libname}>)
if (NOT WIN32)
add_definitions("-fPIC")
endif()
add_library(${libname} OBJECT ${_srcs} ${_incs})
add_dependencies(${libname} generate_dimension_hpp)
target_include_directories(${libname} PRIVATE
${PDAL_INCLUDE_DIR})
set_property(TARGET ${libname} PROPERTY FOLDER "Drivers/${_type}")
endmacro(PDAL_ADD_DRIVER)
###############################################################################
# Add a kernel. Creates object library and adds files to source_group
# for windows IDE.
# _name The driver name.
# _srcs The list of source files to add.
# _incs The list of includes to add.
# _objs The object library name that is created.
macro(PDAL_ADD_KERNEL _name _srcs _incs _objs)
source_group("Header Files\\kernel\\${_name}" FILES ${_incs})
source_group("Source Files\\kernel\\${_name}" FILES ${_srcs})
set(libname kernel_${_name})
set(${_objs} $<TARGET_OBJECTS:${libname}>)
if (NOT WIN32)
add_definitions("-fPIC")
endif()
add_library(${libname} OBJECT ${_srcs} ${_incs})
add_dependencies(${libname} generate_dimension_hpp)
target_include_directories(${libname} PRIVATE
${PDAL_INCLUDE_DIR}
${PDAL_IO_DIR}
${PDAL_FILTERS_DIR})
set_property(TARGET ${libname} PROPERTY FOLDER "Drivers/kernel")
endmacro(PDAL_ADD_KERNEL)
###############################################################################
# Get the operating system information. Generally, CMake does a good job of
# this. Sometimes, though, it doesn't give enough information. This macro will
......
# This module will try to located FBX SDK folder, based on the standard
# directory structure proposed by Autodesk.
# On every platform, the module will look for libraries that matches the
# currently selected cmake generator.
# A version can be specified to the find_package function.
#
# Once done, it will define
# FBX_FOUND - System has Fbx SDK installed
# FBX_INCLUDE_DIRS - The Fbx SDK include directories
# FBX_LIBRARIES - The libraries needed to use Fbx SDK
# FBX_LIBRARIES_DEBUG - The libraries needed to use debug Fbx SDK
#
# It accepts the following variables as input:
#
# FBX_MSVC_RT_DLL - Optional. Select whether to use the DLL version or the
# static library version of the Visual C++ runtime library.
# Default is ON (aka, DLL version: /MD).
#
# Known issues:
# - On ALL platforms: If there are multiple FBX SDK version installed, the
# current implementation will select the first one it finds.
# - On MACOS: If there are multiple FBX SDK compiler supported (clang or gcc),
# the current implementation will select the first one it finds.
#----------------------------------------------------------------------------#
# #
# ozz-animation is hosted at http://github.com/guillaumeblanc/ozz-animation #
# and distributed under the MIT License (MIT). #
# #
# Copyright (c) 2019 Guillaume Blanc #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
# to deal in the Software without restriction, including without limitation #
# the rights to use, copy, modify, merge, publish, distribute, sublicense, #
# and/or sell copies of the Software, and to permit persons to whom the #
# Software is furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in #
# all copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
# DEALINGS IN THE SOFTWARE. #
# #
#----------------------------------------------------------------------------#
###############################################################################
# Generic library search function definition
###############################################################################
function(FindFbxLibrariesGeneric _FBX_ROOT_DIR _OUT_FBX_LIBRARIES _OUT_FBX_LIBRARIES_DEBUG)
# Directory structure depends on the platform:
# - Windows: \lib\<compiler_version>\<processor_type>\<build_mode>
# - Mac OSX: \lib\<compiler_version>\ub\<processor_type>\<build_mode>
# - Linux: \lib\<compiler_version>\<build_mode>
# Figures out matching compiler/os directory.
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
set(FBX_CP_PATH "vs2017")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
set(FBX_CP_PATH "vs2015")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
set(FBX_CP_PATH "vs2013")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
set(FBX_CP_PATH "vs2012")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
set(FBX_CP_PATH "vs2010")
else()
message ("Unsupported MSVC compiler version ${CMAKE_CXX_COMPILER_VERSION}.")
return()
endif()
elseif(APPLE)
set(FBX_CP_PATH "*")
else()
set(FBX_CP_PATH "*")
endif()
# Detects current processor type.
if(NOT APPLE) # No <processor_type> on APPLE platform
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(FBX_PROCESSOR_PATH "x64")
else()
set(FBX_PROCESSOR_PATH "x86")
endif()
endif()
# Set libraries names to search, sorted by preference.
set(FBX_SEARCH_LIB_NAMES fbxsdk-static.a libfbxsdk.a fbxsdk.a)
# Select whether to use the DLL version or the static library version of the Visual C++ runtime library.
# Default is "md", aka use the multithread DLL version of the run-time library.
if (NOT DEFINED FBX_MSVC_RT_DLL OR FBX_MSVC_RT_DLL)
set(FBX_SEARCH_LIB_NAMES ${FBX_SEARCH_LIB_NAMES} libfbxsdk-md.lib)
else()
set(FBX_SEARCH_LIB_NAMES ${FBX_SEARCH_LIB_NAMES} libfbxsdk-mt.lib)
endif()
# Set search path.
set(FBX_SEARCH_LIB_PATH "${_FBX_ROOT_DIR}/lib/${FBX_CP_PATH}/${FBX_PROCESSOR_PATH}")
find_library(FBX_LIB
${FBX_SEARCH_LIB_NAMES}
HINTS "${FBX_SEARCH_LIB_PATH}/release/")
if(FBX_LIB)
# Searches debug version also
find_library(FBX_LIB_DEBUG
${FBX_SEARCH_LIB_NAMES}
HINTS "${FBX_SEARCH_LIB_PATH}/debug/")
if(UNIX)
if(APPLE) # APPLE requires to link with Carbon framework
# find_library(CARBON_FRAMEWORK Carbon)
# list(APPEND FBX_LIB ${CARBON_FRAMEWORK})
# list(APPEND FBX_LIB_DEBUG ${CARBON_FRAMEWORK})
else()
find_package(Threads)
list(APPEND FBX_LIB ${CMAKE_THREAD_LIBS_INIT} dl)
list(APPEND FBX_LIB_DEBUG ${CMAKE_THREAD_LIBS_INIT} dl)
endif()
endif()
FindFbxVersion(${FBX_ROOT_DIR} PATH_VERSION)
# 2019 SDK needs to link against bundled libxml and zlib
if(PATH_VERSION GREATER_EQUAL "2019.1")
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
set(ADDITIONAL_LIB_SEARCH_PATH_RELEASE "${FBX_SEARCH_LIB_PATH}/release/")
set(ADDITIONAL_LIB_SEARCH_PATH_DEBUG "${FBX_SEARCH_LIB_PATH}/debug/")
if (NOT DEFINED FBX_MSVC_RT_DLL OR FBX_MSVC_RT_DLL)
set(XML_SEARCH_LIB_NAMES libxml2-md.lib)
set(Z_SEARCH_LIB_NAMES zlib-md.lib)
else()
set(XML_SEARCH_LIB_NAMES libxml2-mt.lib)
set(Z_SEARCH_LIB_NAMES zlib-mt.lib)
endif()
else()
set(ADDITIONAL_LIB_SEARCH_PATH_RELEASE "")
set(ADDITIONAL_LIB_SEARCH_PATH_DEBUG "")
set(XML_SEARCH_LIB_NAMES "xml2")
set(Z_SEARCH_LIB_NAMES "z")
endif()
find_library(XML_LIB
${XML_SEARCH_LIB_NAMES}
HINTS ${ADDITIONAL_LIB_SEARCH_PATH_RELEASE})
find_library(Z_LIB
${Z_SEARCH_LIB_NAMES}
HINTS ${ADDITIONAL_LIB_SEARCH_PATH_RELEASE})
# Searches debug version also
find_library(XML_LIB_DEBUG
${XML_SEARCH_LIB_NAMES}
HINTS ${ADDITIONAL_LIB_SEARCH_PATH_DEBUG})
find_library(Z_LIB_DEBUG
${Z_SEARCH_LIB_NAMES}
HINTS ${ADDITIONAL_LIB_SEARCH_PATH_DEBUG})
# for whatever reason on apple it will need iconv as well?!
if(APPLE)
find_library(ICONV_LIB
iconv)
# no special debug search here as mac only anyway
if(NOT ICONV_LIB)
message(WARNING "FBX found but required iconv was not found!")
endif()
list(APPEND FBX_LIB ${ICONV_LIB})
list(APPEND FBX_LIB_DEBUG ${ICONV_LIB})
endif()
if(NOT XML_LIB)
message(WARNING "FBX found but required libxml2 was not found!")
endif()
if(NOT Z_LIB)
message(WARNING "FBX found but required zlib was not found!")
endif()
list(APPEND FBX_LIB ${XML_LIB} ${Z_LIB})
list(APPEND FBX_LIB_DEBUG ${XML_LIB_DEBUG} ${Z_LIB_DEBUG})
endif()
set(${_OUT_FBX_LIBRARIES} ${FBX_LIB} PARENT_SCOPE)
set(${_OUT_FBX_LIBRARIES_DEBUG} ${FBX_LIB_DEBUG} PARENT_SCOPE)
else()
message ("A Fbx SDK was found, but doesn't match your compiler settings.")
endif()
# Deduce fbx sdk version
endfunction()
###############################################################################
# Deduce Fbx sdk version
###############################################################################
function(FindFbxVersion _FBX_ROOT_DIR _OUT_FBX_VERSION)
# Opens fbxsdk_version.h in _FBX_ROOT_DIR and finds version defines.
set(fbx_version_filename "${_FBX_ROOT_DIR}include/fbxsdk/fbxsdk_version.h")
if(NOT EXISTS ${fbx_version_filename})
message(SEND_ERROR "Unable to find fbxsdk_version.h")
endif()
file(READ ${fbx_version_filename} fbx_version_file_content)
# Find version major
if(fbx_version_file_content MATCHES "FBXSDK_VERSION_MAJOR[\t ]+([0-9]+)")
set(fbx_version_file_major "${CMAKE_MATCH_1}")
endif()
# Find version minor
if(fbx_version_file_content MATCHES "FBXSDK_VERSION_MINOR[\t ]+([0-9]+)")
set(fbx_version_file_minor "${CMAKE_MATCH_1}")
endif()
# Find version patch
if(fbx_version_file_content MATCHES "FBXSDK_VERSION_POINT[\t ]+([0-9]+)")
set(fbx_version_file_patch "${CMAKE_MATCH_1}")
endif()
if (DEFINED fbx_version_file_major AND
DEFINED fbx_version_file_minor AND
DEFINED fbx_version_file_patch)
set(${_OUT_FBX_VERSION} ${fbx_version_file_major}.${fbx_version_file_minor}.${fbx_version_file_patch} PARENT_SCOPE)
else()
message(SEND_ERROR "Unable to deduce Fbx version for root dir ${_FBX_ROOT_DIR}")
set(${_OUT_FBX_VERSION} "unknown" PARENT_SCOPE)
endif()
endfunction()
###############################################################################
# Main find package function
###############################################################################
# Tries to find FBX SDK path
set(FBX_SEARCH_PATHS
"${FBX_DIR}"
"$ENV{FBX_DIR}"
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/*/"
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/*/"
"/Applications/Autodesk/FBX SDK/*/")
find_path(FBX_INCLUDE_DIR
NAMES "include/fbxsdk.h"
PATHS ${FBX_SEARCH_PATHS})
if(FBX_INCLUDE_DIR)
# Deduce SDK root directory.
set(FBX_ROOT_DIR "${FBX_INCLUDE_DIR}/")
# Fills CMake standard variables
set(FBX_INCLUDE_DIRS "${FBX_INCLUDE_DIR}/include")
# Searches libraries according to the current compiler
FindFbxLibrariesGeneric(${FBX_ROOT_DIR} FBX_LIBRARIES FBX_LIBRARIES_DEBUG)
endif()
# Handles find_package arguments and set FBX_FOUND to TRUE if all listed variables and version are valid.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fbx
FOUND_VAR FBX_FOUND
REQUIRED_VARS FBX_LIBRARIES FBX_INCLUDE_DIRS
VERSION_VAR PATH_VERSION)
# Warn about how this script can fail to find the newest version.
if(NOT FBX_FOUND)
message("-- Note that the FindFbx.cmake script can fail to find the newest Fbx sdk if there are multiple ones installed. Please set \"FBX_DIR\" environment or cmake variable to choose a specific version/location.")
endif()
# - try to find JSONCPP library
#
# Cache Variables: (probably not for direct use in your scripts)
# JSONCPP_INCLUDE_DIR
# JSONCPP_LIBRARY
#
# Non-cache variables you might use in your CMakeLists.txt:
# JSONCPP_FOUND
# JSONCPP_INCLUDE_DIRS
# JSONCPP_LIBRARIES
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Author:
# 2011 Philippe Crassous (ENSAM ParisTech / Institut Image) p.crassous _at_ free.fr
#
# Adapted from the Virtual Reality Peripheral Network library.
# https://github.com/rpavlik/vrpn/blob/master/README.Legal
#
set(JSONCPP_ROOT_DIR
"${JSONCPP_ROOT_DIR}"
CACHE
PATH
"Directory to search for JSONCPP")
set(_jsoncppnames)
set(_pathsuffixes
suncc
vacpp
mingw
msvc6
msvc7
msvc71
msvc80
msvc90
linux-gcc)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
execute_process(COMMAND
${CMAKE_CXX_COMPILER}
-dumpversion
OUTPUT_VARIABLE
_gnucxx_ver
OUTPUT_STRIP_TRAILING_WHITESPACE)
list(APPEND
_jsoncppnames
json_linux-gcc-${_gnucxx_ver}_libmt
json_linux-gcc_libmt)
list(APPEND _pathsuffixes linux-gcc-${_gnucxx_ver})
elseif(MSVC)
if(MSVC_VERSION EQUAL 1200)
list(APPEND _jsoncppnames json_vc6_libmt)
elseif(MSVC_VERSION EQUAL 1300)
list(APPEND _jsoncppnames json_vc7_libmt)
elseif(MSVC_VERSION EQUAL 1310)
list(APPEND _jsoncppnames json_vc71_libmt)
elseif(MSVC_VERSION EQUAL 1400)
list(APPEND _jsoncppnames json_vc8_libmt)
elseif(MSVC_VERSION EQUAL 1500)
list(APPEND _jsoncppnames json_vc9_libmt)
elseif(MSVC_VERSION EQUAL 1600)
list(APPEND _jsoncppnames json_vc10_libmt)
endif()
else()
list(APPEND _jsoncppnames
json_suncc_libmt
json_vacpp_libmt)
endif()
list(APPEND _jsoncppnames
json_mingw_libmt
jsoncpp)
find_library(JSONCPP_LIBRARY
NAMES
${_jsoncppnames}
PATHS
"${JSONCPP_ROOT_DIR}/libs"
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
PATH_SUFFIXES
${_pathsuffixes})
find_path(JSONCPP_INCLUDE_DIR
NAMES
json/json.h
PATHS
"${JSONCPP_ROOT_DIR}"
/usr/include/jsoncpp
PATH_SUFFIXES
include)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JSONCPP
DEFAULT_MSG
JSONCPP_LIBRARY
JSONCPP_INCLUDE_DIR)
if(JSONCPP_FOUND)
set(JSONCPP_LIBRARIES "${JSONCPP_LIBRARY}")
set(JSONCPP_INCLUDE_DIRS "${JSONCPP_INCLUDE_DIR}")
mark_as_advanced(JSONCPP_ROOT_DIR)
endif()
mark_as_advanced(JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY)
#
# N Lohmann JSON handler
#
set(NLOHMANN_INCLUDE_DIR ${PDAL_VENDOR_DIR}/nlohmann)
find_package(OpenSSL 1.1)
if (OPENSSL_FOUND)
set(ARBITER_OPENSSL TRUE)
else ()
message("OpenSSL NOT found - `export OPENSSL_ROOT_DIR=___`")
message("Google storage IO will not be available")
endif ()
......@@ -22,11 +22,6 @@ option(BUILD_PLUGIN_I3S
add_feature_info("I3S plugin" BUILD_PLUGIN_I3S
"Read from a I3S server or from a SLPK file")
option(BUILD_PLUGIN_GREYHOUND
"Choose if Greyhound support should be built" FALSE)
add_feature_info("Greyhound plugin" BUILD_PLUGIN_GREYHOUND
"read points from a Greyhound server")
option(BUILD_PLUGIN_ICEBRIDGE
"Choose if Icebridge support should be built" FALSE)
add_feature_info("Icebridge plugin" BUILD_PLUGIN_ICEBRIDGE
......@@ -57,10 +52,6 @@ option(BUILD_PLUGIN_OCI
add_feature_info("Oracle OCI plugin" BUILD_PLUGIN_OCI
"Read/write point clould patches to Oracle")
option(BUILD_PLUGIN_PCL "Choose if PCL support should be built" FALSE)
add_feature_info("PCL plugin" BUILD_PLUGIN_PCL
"provides PCL-based readers, writers, filters, and kernels")
find_package(PostgreSQL QUIET)
option(BUILD_PLUGIN_PGPOINTCLOUD
"Choose if PostgreSQL PointCloud support should be built"
......@@ -103,6 +94,11 @@ option(BUILD_PLUGIN_TILEDB
add_feature_info("TileDB plugin" BUILD_PLUGIN_TILEDB
"read/write data from TileDB")
option(BUILD_PLUGIN_E57
"Choose if e57 ui support should be built" FALSE)
add_feature_info("E57 plugin" BUILD_PLUGIN_E57
"read/write data to and from e57 format")
option(BUILD_TOOLS_NITFWRAP "Choose if nitfwrap tool should be built" FALSE)
option(WITH_TESTS
......