Skip to content
Open
9 changes: 0 additions & 9 deletions apps/cloud_composer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,9 @@ set(INTERFACE_SOURCES
src/tool_interface/abstract_tool.cpp
)

# Build pcl_cc_tool_interface as static library, to fix issue mentioned in #2708
set(PCL_LIB_TYPE_ORIGIN ${PCL_LIB_TYPE})
set(PCL_LIB_TYPE STATIC)

PCL_ADD_LIBRARY(pcl_cc_tool_interface COMPONENT ${SUBSUBSYS_NAME} SOURCES ${INTERFACE_HEADERS} ${INTERFACE_SOURCES})


target_link_libraries(pcl_cc_tool_interface pcl_common pcl_features pcl_filters pcl_search pcl_visualization ${QTX}::Widgets)

set(PCL_LIB_TYPE ${PCL_LIB_TYPE_ORIGIN})

if(APPLE)
set_target_properties(pcl_cc_tool_interface PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif()
Expand Down Expand Up @@ -134,7 +126,6 @@ PCL_ADD_INCLUDES("${SUBSUBSYS_NAME}" "${SUBSUBSYS_NAME}/impl" ${impl_incs})

PCL_MAKE_PKGCONFIG(${EXE_NAME} COMPONENT ${SUBSUBSYS_NAME} DESC ${SUBSYS_DESC})


#TOOL buildING SCRIPTS
include(ComposerTool.cmake REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion apps/cloud_composer/ComposerTool.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function(define_composer_tool TOOL_NAME TOOL_SOURCES TOOL_HEADERS DEPS)
project(pcl_cc_tool_${TOOL_NAME})

set(TOOL_TARGET pcl_cc_tool_${TOOL_NAME})
PCL_ADD_LIBRARY(${TOOL_TARGET} COMPONENT ${SUBSYS_NAME} SOURCES ${TOOL_SOURCES} ${TOOL_HEADERS})
PCL_ADD_LIBRARY(${TOOL_TARGET} COMPONENT ${SUBSYS_NAME} SOURCES ${TOOL_SOURCES} ${TOOL_HEADERS} EXPORT_SYMBOLS FALSE)

if(WIN32)
set_target_properties (${TOOL_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CLOUD_COMPOSER_PLUGIN_DIR}
Expand Down
13 changes: 7 additions & 6 deletions apps/cloud_composer/include/pcl/apps/cloud_composer/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#pragma once

#include <pcl/apps/cloud_composer/items/cloud_item.h>
#include <pcl/pcl_exports.h>

#include <QUndoCommand>

Expand All @@ -50,7 +51,7 @@ struct OutputPair {
QList<CloudComposerItem*> output_items_;
};

class CloudCommand : public QUndoCommand {
class PCL_EXPORTS CloudCommand : public QUndoCommand {
public:
CloudCommand(ConstItemList input_data, QUndoCommand* parent = nullptr);

Expand Down Expand Up @@ -116,7 +117,7 @@ class CloudCommand : public QUndoCommand {
int template_type_{-1};
};

class ModifyItemCommand : public CloudCommand {
class PCL_EXPORTS ModifyItemCommand : public CloudCommand {
public:
ModifyItemCommand(ConstItemList input_data, QUndoCommand* parent = nullptr);

Expand All @@ -132,7 +133,7 @@ class ModifyItemCommand : public CloudCommand {
private:
};

class NewItemCloudCommand : public CloudCommand {
class PCL_EXPORTS NewItemCloudCommand : public CloudCommand {
public:
NewItemCloudCommand(ConstItemList input_data, QUndoCommand* parent = nullptr);

Expand All @@ -146,7 +147,7 @@ class NewItemCloudCommand : public CloudCommand {
redo() override;
};

class SplitCloudCommand : public CloudCommand {
class PCL_EXPORTS SplitCloudCommand : public CloudCommand {
public:
SplitCloudCommand(ConstItemList input_data, QUndoCommand* parent = nullptr);

Expand All @@ -162,7 +163,7 @@ class SplitCloudCommand : public CloudCommand {
private:
};

class DeleteItemCommand : public CloudCommand {
class PCL_EXPORTS DeleteItemCommand : public CloudCommand {
public:
DeleteItemCommand(ConstItemList input_data, QUndoCommand* parent = nullptr);

Expand All @@ -178,7 +179,7 @@ class DeleteItemCommand : public CloudCommand {
private:
};

class MergeCloudCommand : public CloudCommand {
class PCL_EXPORTS MergeCloudCommand : public CloudCommand {
public:
/** \brief Construct for a merge command
* \param[in] input_data Input list of CloudItem s from the project model which will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include <pcl/apps/cloud_composer/properties_model.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/pcl_exports.h>
#include <pcl/point_types.h>

static QStringList ITEM_TYPES_STRINGS(QStringList() << "Cloud Composer Item"
Expand All @@ -62,7 +63,7 @@ enum {
KD_TREE_SEARCH
};
};
class CloudComposerItem : public QStandardItem {
class PCL_EXPORTS CloudComposerItem : public QStandardItem {
public:
enum ItemType {
CLOUD_COMPOSER_ITEM = QStandardItem::UserType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <pcl/visualization/point_cloud_color_handlers.h>
#include <pcl/visualization/point_cloud_geometry_handlers.h>
#include <pcl/memory.h>
#include <pcl/pcl_exports.h>
#include <pcl/pcl_macros.h>
#include <pcl/PCLPointCloud2.h>
#include <pcl/point_cloud.h>
Expand All @@ -68,7 +69,7 @@ enum PointType {
AXIS = (1 << 5),
};
}
class CloudItem : public CloudComposerItem {
class PCL_EXPORTS CloudItem : public CloudComposerItem {
public:
// This is needed because we have members which are Vector4f and Quaternionf
PCL_MAKE_ALIGNED_OPERATOR_NEW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
#include <pcl/features/fpfh.h>
#include <pcl/visualization/pcl_plotter.h>
#include <pcl/visualization/qvtk_compatibility.h>
#include <pcl/pcl_exports.h>
#include <pcl/point_types.h>

namespace pcl {
namespace cloud_composer {

class FPFHItem : public CloudComposerItem {
class PCL_EXPORTS FPFHItem : public CloudComposerItem {
public:
FPFHItem(QString name,
const pcl::PointCloud<pcl::FPFHSignature33>::Ptr& fpfh_ptr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
namespace pcl {
namespace cloud_composer {

class NormalsItem : public CloudComposerItem {
class PCL_EXPORTS NormalsItem : public CloudComposerItem {
public:
NormalsItem(QString name,
const pcl::PointCloud<pcl::Normal>::Ptr& normals_ptr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class SelectedTrackballStyleInteractor;
class ClickTrackballStyleInteractor;
class ProjectModel;

class InteractorStyleSwitch : public vtkInteractorStyle {
class PCL_EXPORTS InteractorStyleSwitch : public vtkInteractorStyle {
public:
static InteractorStyleSwitch*
New();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace pcl {
namespace cloud_composer {
class RectangularFrustumSelector;

class SelectionEvent {
class PCL_EXPORTS SelectionEvent {

public:
SelectionEvent(vtkSmartPointer<vtkPolyData> selected_points,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@

#pragma once

#include <pcl/pcl_exports.h>

#include <QStandardItemModel>

namespace pcl {
namespace cloud_composer {
class CloudComposerItem;
class PropertiesModel : public QStandardItemModel {
class PCL_EXPORTS PropertiesModel : public QStandardItemModel {
Q_OBJECT
public:
/** \brief Constructor used for tool parameters */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@
#include <pcl/apps/cloud_composer/commands.h>
#include <pcl/apps/cloud_composer/items/cloud_item.h>
#include <pcl/apps/cloud_composer/properties_model.h>
#include <pcl/pcl_exports.h>

#include <QDebug>

namespace pcl {
namespace cloud_composer {

class AbstractTool : public QObject {
class PCL_EXPORTS AbstractTool : public QObject {
Q_OBJECT
public:
AbstractTool(PropertiesModel* parameter_model, QObject* parent);
Expand Down Expand Up @@ -87,7 +88,7 @@ class AbstractTool : public QObject {
QString action_text_;
};

class ModifyItemTool : public AbstractTool {
class PCL_EXPORTS ModifyItemTool : public AbstractTool {
Q_OBJECT
public:
ModifyItemTool(PropertiesModel* parameter_model, QObject* parent)
Expand All @@ -111,7 +112,7 @@ class ModifyItemTool : public AbstractTool {
}
};

class NewItemTool : public AbstractTool {
class PCL_EXPORTS NewItemTool : public AbstractTool {
Q_OBJECT
public:
NewItemTool(PropertiesModel* parameter_model, QObject* parent)
Expand All @@ -135,7 +136,7 @@ class NewItemTool : public AbstractTool {
}
};

class SplitItemTool : public AbstractTool {
class PCL_EXPORTS SplitItemTool : public AbstractTool {
Q_OBJECT
public:
SplitItemTool(PropertiesModel* parameter_model, QObject* parent)
Expand All @@ -159,7 +160,7 @@ class SplitItemTool : public AbstractTool {
}
};

class MergeCloudTool : public AbstractTool {
class PCL_EXPORTS MergeCloudTool : public AbstractTool {
Q_OBJECT
public:
MergeCloudTool(PropertiesModel* parameter_model, QObject* parent)
Expand Down
39 changes: 29 additions & 10 deletions cmake/pcl_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ endmacro()
# SOURCES The source files for the library.
function(PCL_ADD_LIBRARY _name)
set(options)
set(oneValueArgs COMPONENT)
set(oneValueArgs COMPONENT EXPORT_SYMBOLS)
set(multiValueArgs SOURCES INCLUDES)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

Expand Down Expand Up @@ -222,11 +222,22 @@ function(PCL_ADD_LIBRARY _name)
if(MSVC)
target_link_libraries(${_name} delayimp.lib) # because delay load is enabled for openmp.dll
endif()


if(NOT DEFINED ARGS_EXPORT_SYMBOLS)
set(ARGS_EXPORT_SYMBOLS TRUE)
endif()

if(ARGS_EXPORT_SYMBOLS)
if(PCL_SHARED_LIBS)
target_compile_definitions(${_name} PRIVATE PCLAPI_EXPORTS)
else()
target_compile_definitions(${_name} PRIVATE PCL_STATIC_DEFINE)
endif()
endif()

set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
DEFINE_SYMBOL "PCLAPI_EXPORTS")
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR})

set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
endif()
Expand All @@ -249,7 +260,7 @@ endfunction()
# SOURCES The source files for the library.
function(PCL_CUDA_ADD_LIBRARY _name)
set(options)
set(oneValueArgs COMPONENT)
set(oneValueArgs COMPONENT EXPORT_SYMBOLS)
set(multiValueArgs SOURCES INCLUDES)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

Expand Down Expand Up @@ -293,11 +304,19 @@ function(PCL_CUDA_ADD_LIBRARY _name)
if(MSVC)
target_link_libraries(${_name} delayimp.lib) # because delay load is enabled for openmp.dll
endif()

set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
DEFINE_SYMBOL "PCLAPI_EXPORTS")

if(NOT DEFINED ARGS_EXPORT_SYMBOLS)
set(ARGS_EXPORT_SYMBOLS TRUE)
endif()

if(ARGS_EXPORT_SYMBOLS)
if(PCL_SHARED_LIBS)
target_compile_definitions(${_name} PRIVATE PCLAPI_EXPORTS)
else()
target_compile_definitions(${_name} PRIVATE PCL_STATIC_DEFINE)
endif()
endif()

set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
endif()

Expand Down
4 changes: 2 additions & 2 deletions common/include/pcl/common/intersections.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace pcl
* \param[in] sqr_eps maximum allowable squared distance to the true solution
* \ingroup common
*/
PCL_EXPORTS inline bool
inline bool
lineWithLineIntersection (const Eigen::VectorXf &line_a,
const Eigen::VectorXf &line_b,
Eigen::Vector4f &point,
Expand All @@ -71,7 +71,7 @@ namespace pcl
* \ingroup common
*/

PCL_EXPORTS inline bool
inline bool
lineWithLineIntersection (const pcl::ModelCoefficients &line_a,
const pcl::ModelCoefficients &line_b,
Eigen::Vector4f &point,
Expand Down
Loading
Loading