File tree Expand file tree Collapse file tree 3 files changed +33
-22
lines changed
Expand file tree Collapse file tree 3 files changed +33
-22
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,9 @@ function(PCL_ADD_LIBRARY _name)
232232 DEFINE_SYMBOL "PCLAPI_EXPORTS" )
233233 endif ()
234234
235+ target_compile_definitions (
236+ ${_name} PUBLIC "$<IF :$<BOOL :${PCL_SHARED_LIBS} >,PCLAPI_EXPORTS ,PCL_STATIC_DEFINE >" )
237+
235238 set_target_properties (${_name} PROPERTIES
236239 VERSION ${PCL_VERSION}
237240 SOVERSION ${PCL_VERSION_MAJOR} .${PCL_VERSION_MINOR} )
Original file line number Diff line number Diff line change 4040// Header 'pcl_macros' is not suitable since it includes <Eigen/Core>,
4141// which can't be eaten by nvcc (it's too weak)
4242
43- #if defined _WIN32 || defined WINCE || defined __MINGW32__
44- #ifdef PCLAPI_EXPORTS
45- #define PCL_EXPORTS __declspec(dllexport)
46- #else
47- #define PCL_EXPORTS __declspec(dllimport)
48- #endif
43+ #ifdef PCL_STATIC_DEFINE
44+ #define PCL_EXPORTS
4945#else
50- #ifdef PCL_SYMBOL_VISIBILITY_HIDDEN
51- #define PCL_EXPORTS __attribute__ ((visibility ("default")))
52- #else
53- #define PCL_EXPORTS
54- #endif
46+ #if defined WIN32 || defined _WIN32 || defined WINCE || defined __MINGW32__
47+ #ifdef PCLAPI_EXPORTS
48+ #define PCL_EXPORTS __declspec(dllexport)
49+ #else
50+ #define PCL_EXPORTS __declspec(dllimport)
51+ #endif
52+ #else
53+ #ifdef PCL_SYMBOL_VISIBILITY_HIDDEN
54+ #define PCL_EXPORTS __attribute__ ((visibility ("default")))
55+ #else
56+ #define PCL_EXPORTS
57+ #endif
58+ #endif
5559#endif
Original file line number Diff line number Diff line change @@ -315,18 +315,22 @@ pcl_round (float number)
315315 #endif
316316#endif
317317
318- #if defined WIN32 || defined _WIN32 || defined WINCE || defined __MINGW32__
319- #ifdef PCLAPI_EXPORTS
320- #define PCL_EXPORTS __declspec (dllexport)
321- #else
322- #define PCL_EXPORTS __declspec (dllimport)
323- #endif
318+ #ifdef PCL_STATIC_DEFINE
319+ #define PCL_EXPORTS
324320#else
325- #ifdef PCL_SYMBOL_VISIBILITY_HIDDEN
326- #define PCL_EXPORTS __attribute__ ((visibility (" default" )))
327- #else
328- #define PCL_EXPORTS
329- #endif
321+ #if defined WIN32 || defined _WIN32 || defined WINCE || defined __MINGW32__
322+ #ifdef PCLAPI_EXPORTS
323+ #define PCL_EXPORTS __declspec (dllexport)
324+ #else
325+ #define PCL_EXPORTS __declspec (dllimport)
326+ #endif
327+ #else
328+ #ifdef PCL_SYMBOL_VISIBILITY_HIDDEN
329+ #define PCL_EXPORTS __attribute__ ((visibility (" default" )))
330+ #else
331+ #define PCL_EXPORTS
332+ #endif
333+ #endif
330334#endif
331335
332336#if defined WIN32 || defined _WIN32
You can’t perform that action at this time.
0 commit comments