Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into roofs
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jan 28, 2019
2 parents 0be300f + 755ac1a commit 4be5364
Show file tree
Hide file tree
Showing 29 changed files with 421 additions and 294 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ 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}/openssl.cmake) # Optional

#------------------------------------------------------------------------------
# generate the pdal_features.hpp header
Expand Down
4 changes: 2 additions & 2 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set(INCLUDE_INSTALL_DIR include/ CACHE PATH "include")
set(LIB_INSTALL_DIR lib/ CACHE PATH "lib")
set(LIB_INSTALL_DIR ${PDAL_LIB_INSTALL_DIR} CACHE PATH "lib")
set(SYSCONFIG_INSTALL_DIR etc/pdal/ CACHE PATH "sysconfig")

include(CMakePackageConfigHelpers)

set(PDAL_CONFIG_INCLUDE_DIRS
"${CMAKE_INSTALL_PREFIX}/include")
set(PDAL_CONFIG_LIBRARY_DIRS
"${CMAKE_INSTALL_PREFIX}/lib")
"${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")

configure_package_config_file(
PDALConfig.cmake.in
Expand Down
12 changes: 9 additions & 3 deletions cmake/macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ endmacro(PDAL_ADD_EXECUTABLE)
# ARGN :
# FILES the source files for the plugin
# LINK_WITH link plugin with libraries
# INCLUDES header directories
#
# The "generate_dimension_hpp" ensures that Dimension.hpp is built before
# attempting to build anything else in the "library".
Expand All @@ -116,7 +117,7 @@ endmacro(PDAL_ADD_EXECUTABLE)
macro(PDAL_ADD_PLUGIN _name _type _shortname)
set(options)
set(oneValueArgs)
set(multiValueArgs FILES LINK_WITH)
set(multiValueArgs FILES LINK_WITH INCLUDES)
cmake_parse_arguments(PDAL_ADD_PLUGIN "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
if(WIN32)
Expand All @@ -133,7 +134,9 @@ macro(PDAL_ADD_PLUGIN _name _type _shortname)
pdal_target_compile_settings(${${_name}})
target_include_directories(${${_name}} PRIVATE
${PROJECT_BINARY_DIR}/include
${PDAL_INCLUDE_DIR})
${PDAL_INCLUDE_DIR}
${PDAL_ADD_PLUGIN_INCLUDES}
)
target_link_libraries(${${_name}}
PRIVATE
${PDAL_BASE_LIB_NAME}
Expand Down Expand Up @@ -164,10 +167,12 @@ endmacro(PDAL_ADD_PLUGIN)
# ARGN :
# FILES the source files for the test
# LINK_WITH link test executable with libraries
# INCLUDES header file directories
#
macro(PDAL_ADD_TEST _name)
set(options)
set(oneValueArgs)
set(multiValueArgs FILES LINK_WITH)
set(multiValueArgs FILES LINK_WITH INCLUDES)
cmake_parse_arguments(PDAL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (WIN32)
list(APPEND ${PDAL_ADD_TEST_FILES} ${PDAL_TARGET_OBJECTS})
Expand All @@ -179,6 +184,7 @@ macro(PDAL_ADD_TEST _name)
target_include_directories(${_name} PRIVATE
${ROOT_DIR}
${PDAL_INCLUDE_DIR}
${PDAL_ADD_TEST_INCLUDES}
${PROJECT_SOURCE_DIR}/test/unit
${PROJECT_BINARY_DIR}/test/unit
${PROJECT_BINARY_DIR}/include)
Expand Down
8 changes: 8 additions & 0 deletions cmake/openssl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
find_package(OpenSSL 1.0.1)
if (OPENSSL_FOUND)
set(ARBITER_OPENSSL TRUE)
else()
# For me this is /usr/local/opt/openssl\@1.1
message("OpenSSL NOT found - `export OPENSSL_ROOT_DIR=___`")
message("Google storage IO will not be available")
endif()
2 changes: 0 additions & 2 deletions doc/stages/writers.ply.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ mesh suitable for output as faces.

.. embed::

.. streamable::

Example
-------

Expand Down
8 changes: 8 additions & 0 deletions pdal/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ void Reader::readerAddArgs(ProgramArgs& args)

void Reader::setSpatialReference(MetadataNode& m, const SpatialReference& srs)
{
if (srs.empty() && !m_defaultSrs.empty())
{
// If an attempt comes in to clear the SRS but we have a default,
// revert to the default rather than clearing.
Stage::setSpatialReference(m, m_defaultSrs);
return;
}

if (getSpatialReference().empty() || m_overrideSrs.empty())
{
Stage::setSpatialReference(m, srs);
Expand Down
18 changes: 12 additions & 6 deletions plugins/cpd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ set(files filters/CpdFilter.cpp)
set(include_dirs "${CMAKE_CURRENT_LIST_DIR}" "${PDAL_VENDOR_DIR}/eigen")

PDAL_ADD_PLUGIN(filter_libname filter cpd
FILES filters/CpdFilter.cpp
LINK_WITH Cpd::Library-C++
FILES
filters/CpdFilter.cpp
LINK_WITH
Cpd::Library-C++
INCLUDES
"${include_dirs}"
)
target_include_directories(${filter_libname} PRIVATE "${include_dirs}")

if(${WITH_TESTS})
PDAL_ADD_TEST(pdal_filters_cpd_test
FILES test/CpdFilterTest.cpp
LINK_WITH ${filter_libname}
FILES
test/CpdFilterTest.cpp
LINK_WITH
${filter_libname}
INCLUDES
"${include_dirs}"
)
target_include_directories(pdal_filters_cpd_test PRIVATE "${include_dirs}")
endif()
20 changes: 12 additions & 8 deletions plugins/fbx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ if (FBX_FOUND)
io/FbxWriter.cpp
LINK_WITH
${FBX_LIBRARY}
${CORE_FOUNDATION})
target_include_directories(${writer_libname} PRIVATE
${PDAL_IO_DIR}
${FBX_INCLUDE_DIR})
${CORE_FOUNDATION}
INCLUDES
${PDAL_IO_DIR}
${FBX_INCLUDE_DIR}
)

if (WITH_TESTS)
PDAL_ADD_TEST(fbxtest
FILES test/FbxWriterTest.cpp
LINK_WITH ${writer_libname})
target_include_directories(fbxtest PRIVATE
${PDAL_IO_DIR})
FILES
test/FbxWriterTest.cpp
LINK_WITH
${writer_libname}
INCLUDES
${PDAL_IO_DIR}
)
endif()
else()
message(STATUS "Building without FBX support")
Expand Down
19 changes: 9 additions & 10 deletions plugins/greyhound/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ PDAL_ADD_PLUGIN(reader_libname reader greyhound
LINK_WITH
${PDAL_JSONCPP_LIB_NAME}
${WINSOCK_LIBRARY}
INCLUDES
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
)

PDAL_ADD_PLUGIN(writer_libname writer greyhound
Expand All @@ -31,15 +34,11 @@ PDAL_ADD_PLUGIN(writer_libname writer greyhound
LINK_WITH
${PDAL_JSONCPP_LIB_NAME}
${WINSOCK_LIBRARY}
INCLUDES
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
)

target_include_directories(${reader_libname} PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR})

target_include_directories(${writer_libname} PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR})

if (WITH_TESTS)
PDAL_ADD_TEST(pdal_io_greyhound_reader_test
Expand All @@ -49,8 +48,8 @@ if (WITH_TESTS)
${reader_libname}
${writer_libname}
${PDAL_JSONCPP_LIB_NAME}
INCLUDES
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
)
target_include_directories(pdal_io_greyhound_reader_test PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR})
endif()
87 changes: 37 additions & 50 deletions plugins/i3s/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

include(${PDAL_CMAKE_DIR}/zlib.cmake)

add_subdirectory(lepcc)

PDAL_ADD_PLUGIN(i3s_reader_libname reader i3s
Expand All @@ -10,6 +12,20 @@ PDAL_ADD_PLUGIN(i3s_reader_libname reader i3s
LINK_WITH
${PDAL_JSONCPP_LIB_NAME}
${WINSOCK_LIBRARY}
${GDAL_LIBRARY}
${ZLIB_LIBRARY}
lepcc
INCLUDES
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
)
target_compile_definitions(${i3s_reader_libname}
PRIVATE
ARBITER_ZLIB
ARBITER_DLL_IMPORT
)

PDAL_ADD_PLUGIN(slpk_reader_libname reader slpk
Expand All @@ -21,49 +37,22 @@ PDAL_ADD_PLUGIN(slpk_reader_libname reader slpk
LINK_WITH
${PDAL_JSONCPP_LIB_NAME}
${WINSOCK_LIBRARY}
)


target_link_libraries(${i3s_reader_libname} PRIVATE
${GDAL_LIBRARY}
${ZLIB_LIBRARY}
lepcc
)

target_link_libraries(${slpk_reader_libname} PRIVATE
${GDAL_LIBRARY}
${ZLIB_LIBRARY}
lepcc
)

include(${PDAL_CMAKE_DIR}/zlib.cmake)
target_compile_definitions(${i3s_reader_libname}
PRIVATE
ARBITER_ZLIB
ARBITER_DLL_IMPORT
${GDAL_LIBRARY}
${ZLIB_LIBRARY}
lepcc
INCLUDES
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
)
target_compile_definitions(${slpk_reader_libname}
PRIVATE
ARBITER_ZLIB
ARBITER_DLL_IMPORT
)

target_include_directories(${i3s_reader_libname} PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
)

target_include_directories(${slpk_reader_libname} PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
)

if (WITH_TESTS)
PDAL_ADD_TEST(pdal_io_slpk_reader_test
FILES
Expand All @@ -72,13 +61,12 @@ if (WITH_TESTS)
${slpk_reader_libname}
${PDAL_JSONCPP_LIB_NAME}
${GDAL_LIBRARY}
)
target_include_directories(pdal_io_slpk_reader_test PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
INCLUDES
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
)
target_compile_definitions(pdal_io_slpk_reader_test
PRIVATE
Expand All @@ -94,13 +82,12 @@ if (WITH_TESTS)
${i3s_reader_libname}
${PDAL_JSONCPP_LIB_NAME}
${GDAL_LIBRARY}
)
target_include_directories(pdal_io_i3s_reader_test PRIVATE
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
INCLUDES
${PDAL_JSONCPP_INCLUDE_DIR}
${PDAL_VENDOR_DIR}
${LEPCC_INCLUDE_DIR}
${PDAL_VENDOR_DIR}/eigen
${GDAL_INCLUDE_DIR}
)
target_compile_definitions(pdal_io_i3s_reader_test
PRIVATE
Expand Down
9 changes: 5 additions & 4 deletions plugins/icebridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ else()
FILES
io/IcebridgeReader.cpp
io/Hdf5Handler.cpp
LINK_WITH ${HDF5_LIBRARIES})
target_include_directories(${libname}
PRIVATE
LINK_WITH
${HDF5_LIBRARIES}
INCLUDES
${ROOT_DIR}
${LIBXML2_INCLUDE_DIR})
${LIBXML2_INCLUDE_DIR}
)

if (WITH_TESTS)
PDAL_ADD_TEST(icetest
Expand Down

0 comments on commit 4be5364

Please sign in to comment.