Skip to content

Commit 1f7dd40

Browse files
committed
Make kdtree an interface library if PCL_NO_PRECOMPILE is true.
1 parent 684fde2 commit 1f7dd40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kdtree/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ set(impl_incs
2929
)
3030

3131
set(LIB_NAME "pcl_${SUBSYS_NAME}")
32-
if(FLANN_FOUND)
32+
# PCL_ADD_LIBRARY will create an INTERFACE library if no sources are added and a normal library if sources are present.
33+
if((NOT PCL_NO_PRECOMPILE) AND FLANN_FOUND)
3334
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs})
3435
target_link_libraries("${LIB_NAME}" pcl_common FLANN::FLANN)
3536
set(EXT_DEPS flann)

0 commit comments

Comments
 (0)