Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute filter is no longer a (shared) plugin #1171

Merged
merged 2 commits into from Mar 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions CMakeLists.txt
Expand Up @@ -121,10 +121,6 @@ option(WITH_COMPLETION "Install bash completions scripts for command line?" FALS
add_feature_info("Bash completion" WITH_COMPLETION
"completion for PDAL command line")

option(BUILD_PLUGIN_ATTRIBUTE "Choose if Attribute filter is built" FALSE)
add_feature_info("Attribute plugin" BUILD_PLUGIN_ATTRIBUTE
"apply attributes to a subset of points")

option(BUILD_PLUGIN_CPD "Choose if Coherent Point Drift kernel is built" FALSE)
add_feature_info("CPD plugin" BUILD_PLUGIN_CPD
"run Coherent Point Drift on two datasets")
Expand Down
1 change: 1 addition & 0 deletions filters/CMakeLists.txt
@@ -1,3 +1,4 @@
add_subdirectory(attribute)
add_subdirectory(chipper)
add_subdirectory(colorization)
add_subdirectory(crop)
Expand Down
Expand Up @@ -52,7 +52,7 @@ static PluginInfo const s_info = PluginInfo(
"an OGR-readable data source, or an OGR SQL query.",
"http://pdal.io/stages/filters.attribute.html" );

CREATE_SHARED_PLUGIN(1, 0, AttributeFilter, Filter, s_info)
CREATE_STATIC_PLUGIN(1, 0, AttributeFilter, Filter, s_info)

struct OGRDataSourceDeleter
{
Expand Down
Expand Up @@ -34,12 +34,16 @@

#pragma once

#include <pdal/plugin.hpp>
#include <pdal/Filter.hpp>

#include <map>
#include <memory>
#include <string>

extern "C" int32_t AttributeFilter_ExitFunc();
extern "C" PF_ExitFunc AttributeFilter_InitPlugin();

typedef struct GEOSContextHandle_HS *GEOSContextHandle_t;

typedef void *OGRLayerH;
Expand Down
9 changes: 9 additions & 0 deletions filters/attribute/CMakeLists.txt
@@ -0,0 +1,9 @@
#
# Attribute filter CMake configuration
#

set(srcs AttributeFilter.cpp)
set(incs AttributeFilter.hpp)

PDAL_ADD_DRIVER(filter attribute "${srcs}" "${incs}" objects)
set(PDAL_TARGET_OBJECTS ${PDAL_TARGET_OBJECTS} ${objects} PARENT_SCOPE)
5 changes: 0 additions & 5 deletions plugins/CMakeLists.txt
@@ -1,9 +1,5 @@
include(${PDAL_CMAKE_DIR}/test.cmake)

if(BUILD_PLUGIN_ATTRIBUTE)
add_subdirectory(attribute)
endif()

if(BUILD_PLUGIN_CPD)
add_subdirectory(cpd)
endif(BUILD_PLUGIN_CPD)
Expand Down Expand Up @@ -63,4 +59,3 @@ endif(BUILD_PLUGIN_RIVLIB)
if(BUILD_PLUGIN_SQLITE)
add_subdirectory(sqlite)
endif()

28 changes: 0 additions & 28 deletions plugins/attribute/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion scripts/appveyor/config.cmd
@@ -1,7 +1,6 @@
@echo off

cmake -G "Visual Studio 14 2015 Win64" ^
-DBUILD_PLUGIN_ATTRIBUTE=%PDAL_OPTIONAL_COMPONENTS% ^
-DBUILD_PLUGIN_CPD=OFF ^
-DBUILD_PLUGIN_GREYHOUND=OFF ^
-DBUILD_PLUGIN_HEXBIN=OFF ^
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/script.sh
Expand Up @@ -23,7 +23,6 @@ esac


cmake \
-DBUILD_PLUGIN_ATTRIBUTE=$OPTIONAL_COMPONENT_SWITCH \
-DBUILD_PLUGIN_CPD=OFF \
-DBUILD_PLUGIN_GREYHOUND=OFF \
-DBUILD_PLUGIN_HEXBIN=$OPTIONAL_COMPONENT_SWITCH \
Expand Down
1 change: 0 additions & 1 deletion scripts/docker/Dockerfile
Expand Up @@ -18,7 +18,6 @@ RUN git clone --depth=1 https://github.com/PDAL/PDAL \
&& mkdir build \
&& cd build \
&& cmake \
-DBUILD_PLUGIN_ATTRIBUTE=ON \
-DBUILD_PLUGIN_CPD=ON \
-DBUILD_PLUGIN_GREYHOUND=ON \
-DBUILD_PLUGIN_HEXBIN=ON \
Expand Down
1 change: 0 additions & 1 deletion scripts/linux-install-scripts/pdal.sh
Expand Up @@ -21,7 +21,6 @@ cmake -G "Unix Makefiles" \
-DWITH_LAZPERF=ON \
-DWITH_LIBXML2=ON \
-DBUILD_PLUGIN_PYTHON=ON \
-DBUILD_PLUGIN_ATTRIBUTE=ON \
-DBUILD_PLUGIN_HEXBIN=ON \
-DBUILD_PLUGIN_ICEBRIDGE=ON \
-DBUILD_PLUGIN_NITF=ON \
Expand Down
3 changes: 2 additions & 1 deletion src/StageFactory.cpp
Expand Up @@ -37,6 +37,7 @@
#include <pdal/util/FileUtils.hpp>

// filters
#include <attribute/AttributeFilter.hpp>
#include <chipper/ChipperFilter.hpp>
#include <colorization/ColorizationFilter.hpp>
#include <crop/CropFilter.hpp>
Expand Down Expand Up @@ -191,6 +192,7 @@ StageFactory::StageFactory(bool no_plugins)
}

// filters
PluginManager::initializePlugin(AttributeFilter_InitPlugin);
PluginManager::initializePlugin(ChipperFilter_InitPlugin);
PluginManager::initializePlugin(ColorizationFilter_InitPlugin);
PluginManager::initializePlugin(CropFilter_InitPlugin);
Expand Down Expand Up @@ -249,4 +251,3 @@ Stage *StageFactory::createStage(std::string const& stage_name)
}

} // namespace pdal

1 change: 1 addition & 0 deletions test/unit/CMakeLists.txt
Expand Up @@ -102,6 +102,7 @@ PDAL_ADD_TEST(pdal_io_text_test FILES io/text/TextReaderTest.cpp)
#
# sources for the native filters
#
PDAL_ADD_TEST(pdal_filters_attribute_test FILES filters/AttributeFilterTest.cpp)
PDAL_ADD_TEST(pdal_filters_chipper_test FILES filters/ChipperTest.cpp)
PDAL_ADD_TEST(pdal_filters_colorization_test FILES filters/ColorizationFilterTest.cpp)
PDAL_ADD_TEST(pdal_filters_crop_test FILES filters/CropFilterTest.cpp)
Expand Down