File tree Expand file tree Collapse file tree 5 files changed +19
-4
lines changed
Expand file tree Collapse file tree 5 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,14 @@ endif()
449449# Boost (required)
450450include ("${PCL_SOURCE_DIR} /cmake/pcl_find_boost.cmake" )
451451
452+ # System zlib (for io-png and nurbs on surface)
453+ option (WITH_SYSTEM_ZLIB "Use system zlib" TRUE )
454+ message (WARNING "WITH_SYSTEM_ZLIB option is deprecated, has no effect and will be removed in 1.18." )
455+ find_package (ZLIB )
456+ if (ZLIB_FOUND)
457+ set (HAVE_ZLIB ON )
458+ endif ()
459+
452460option (WITH_SYSTEM_CJSON "Use system cJSON" TRUE )
453461if (WITH_SYSTEM_CJSON)
454462 find_package (cJSON )
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ set(SUBSYS_EXT_DEPS boost eigen3)
55
66PCL_SUBSYS_OPTION (build "${SUBSYS_NAME} " "${SUBSYS_DESC} " ON )
77if (WIN32 )
8- PCL_SUBSYS_DEPEND (build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} OPT_DEPS openni openni2 ensenso davidSDK dssdk rssdk rssdk2 pcap png vtk OpenMP EXT_DEPS ${SUBSYS_EXT_DEPS} )
8+ PCL_SUBSYS_DEPEND (build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} OPT_DEPS openni openni2 ensenso davidSDK dssdk rssdk rssdk2 pcap png vtk OpenMP ZLIB EXT_DEPS ${SUBSYS_EXT_DEPS} )
99else ()
10- PCL_SUBSYS_DEPEND (build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} OPT_DEPS openni openni2 ensenso davidSDK dssdk pcap png vtk libusb OpenMP EXT_DEPS ${SUBSYS_EXT_DEPS} )
10+ PCL_SUBSYS_DEPEND (build NAME ${SUBSYS_NAME} DEPS ${SUBSYS_DEPS} OPT_DEPS openni openni2 ensenso davidSDK dssdk pcap png vtk libusb OpenMP ZLIB EXT_DEPS ${SUBSYS_EXT_DEPS} )
1111endif ()
1212
1313PCL_ADD_DOC ("${SUBSYS_NAME} " )
@@ -244,7 +244,7 @@ set(srcs
244244 ${RSSDK2_GRABBER_SOURCES}
245245)
246246
247- if (PNG_FOUND)
247+ if (PNG_FOUND AND ZLIB_FOUND )
248248 list (APPEND srcs
249249 src/libpng_wrapper.cpp
250250 )
@@ -373,6 +373,10 @@ if(PNG_FOUND)
373373 target_link_libraries ("${LIB_NAME} " ${PNG_LIBRARIES} )
374374endif ()
375375
376+ if (PNG_FOUND AND ZLIB_FOUND)
377+ target_link_libraries ("${LIB_NAME} " ZLIB::ZLIB )
378+ endif ()
379+
376380if (LIBUSB_FOUND)
377381 target_link_libraries ("${LIB_NAME} " libusb::libusb )
378382endif ()
Original file line number Diff line number Diff line change 6363
6464#cmakedefine HAVE_PNG
6565
66+ #cmakedefine HAVE_ZLIB
67+
6668#cmakedefine HAVE_CJSON
6769
6870#cmakedefine PCL_PREFER_BOOST_FILESYSTEM
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ if(BUILD_surface_on_nurbs)
6868 include (src/on_nurbs/on_nurbs.cmake )
6969
7070 find_package (ZLIB REQUIRED )
71- list (APPEND ON_NURBS_LIBRARIES ${ZLIB_LIBRARIES} )
7271 list (APPEND SUBSYS_EXT_DEPS zlib)
72+ list (APPEND ON_NURBS_LIBRARIES ZLIB::ZLIB)
7373endif ()
7474
7575set (POISSON_INCLUDES
Original file line number Diff line number Diff line change 1414////////////////////////////////////////////////////////////////
1515*/
1616
17+ #include < pcl/pcl_config.h> // for HAVE_ZLIB
1718#include " pcl/surface/3rdparty/opennurbs/opennurbs.h"
1819
1920bool ON_BinaryArchive::WriteCompressedBuffer (
You can’t perform that action at this time.
0 commit comments