Skip to content

Commit a113c61

Browse files
authored
Merge pull request #6399 from larshg/removezlibusedinsurfacenurbs
Remove local source copied zlib files
2 parents 4db3dc4 + e134f0f commit a113c61

File tree

28 files changed

+16
-9937
lines changed

28 files changed

+16
-9937
lines changed

CMakeLists.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -449,15 +449,10 @@ endif()
449449
# Boost (required)
450450
include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake")
451451

452-
# System zlib (for nurbs on surface)
453-
option(WITH_SYSTEM_ZLIB "Use system zlib" TRUE)
454-
if(WITH_SYSTEM_ZLIB)
455-
find_package(ZLIB)
456-
if(ZLIB_FOUND)
457-
set(HAVE_ZLIB ON)
458-
endif()
459-
else()
460-
message(WARNING "CMake will use a ZLIB version bundled with the PCL source code. However, that is an older version which may pose a risk and may be removed in a future PCL release. It is recommended to install an up-to-date version of ZLIB on your system and set WITH_SYSTEM_ZLIB=TRUE.")
452+
# System zlib (for io-png and nurbs on surface)
453+
find_package(ZLIB)
454+
if(ZLIB_FOUND)
455+
set(HAVE_ZLIB ON)
461456
endif()
462457

463458
option(WITH_SYSTEM_CJSON "Use system cJSON" TRUE)

io/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set(SUBSYS_EXT_DEPS boost eigen3)
55

66
PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON)
77
if(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})
99
else()
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})
1111
endif()
1212

1313
PCL_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})
374374
endif()
375375

376+
if(PNG_FOUND AND ZLIB_FOUND)
377+
target_link_libraries("${LIB_NAME}" ZLIB::ZLIB)
378+
endif()
379+
376380
if(LIBUSB_FOUND)
377381
target_link_libraries("${LIB_NAME}" libusb::libusb)
378382
endif()

surface/CMakeLists.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,9 @@ if(BUILD_surface_on_nurbs)
6767
include(src/3rdparty/opennurbs/openNURBS.cmake)
6868
include(src/on_nurbs/on_nurbs.cmake)
6969

70-
if(WITH_SYSTEM_ZLIB)
71-
find_package(ZLIB REQUIRED)
72-
list(APPEND ON_NURBS_LIBRARIES ${ZLIB_LIBRARIES})
73-
list(APPEND SUBSYS_EXT_DEPS zlib)
74-
else()
75-
include(src/3rdparty/opennurbs/zlib.cmake)
76-
list(APPEND OPENNURBS_INCLUDES ${ZLIB_INCLUDES})
77-
list(APPEND OPENNURBS_SOURCES ${ZLIB_SOURCES})
78-
endif()
70+
find_package(ZLIB REQUIRED)
71+
list(APPEND SUBSYS_EXT_DEPS zlib)
72+
list(APPEND ON_NURBS_LIBRARIES ZLIB::ZLIB)
7973
endif()
8074

8175
set(POISSON_INCLUDES

surface/include/pcl/surface/3rdparty/opennurbs/crc32.h

Lines changed: 0 additions & 441 deletions
This file was deleted.

surface/include/pcl/surface/3rdparty/opennurbs/deflate.h

Lines changed: 0 additions & 328 deletions
This file was deleted.

0 commit comments

Comments
 (0)