Skip to content
Snippets Groups Projects
Commit d6a49b93 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Fixing zlib dependency for libxml2.

vtklibxml2 depends on zlib but was never setting up a dependency for it nor was
it using the right variable after modularization changes. Fixed that.

Change-Id: I5932313ea5b2cdba47e885a728778abc5d6739f8
parent 9b1a0f4f
No related branches found
No related tags found
No related merge requests found
vtk_module(vtklibxml2 EXCLUDE_FROM_WRAPPING)
vtk_module(vtklibxml2
DEPENDS
vtkzlib
EXCLUDE_FROM_WRAPPING)
......@@ -45,9 +45,9 @@ CHECK_LIBRARY_EXISTS_CONCAT("dld" shl_load HAVE_SHLLOAD)
#CHECK_LIBRARY_EXISTS_CONCAT("history" append_history HAVE_LIBHISTORY)
#CHECK_LIBRARY_EXISTS_CONCAT("readline" readline HAVE_LIBREADLINE)
IF(NOT VTK_ZLIB_LIBRARIES)
IF(NOT vtkzlib_LIBRARIES)
CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
ENDIF(NOT VTK_ZLIB_LIBRARIES)
ENDIF(NOT vtkzlib_LIBRARIES)
# Use needed system libraries.
SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${CMAKE_THREAD_LIBS} ${CMAKE_DL_LIBS})
......@@ -63,10 +63,10 @@ SET(CMAKE_REQUIRED_LIBRARIES ${LIBXML2_LIBS})
SET(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
# Use VTK's zlib if we are building in the tree.
IF(VTK_ZLIB_LIBRARIES)
IF(vtkzlib_LIBRARIES)
SET(HAVE_LIBZ 1)
SET(LIBXML2_LIBS ${VTK_ZLIB_LIBRARIES} ${LIBXML2_LIBS})
ENDIF(VTK_ZLIB_LIBRARIES)
SET(LIBXML2_LIBS ${vtkzlib_LIBRARIES} ${LIBXML2_LIBS})
ENDIF(vtkzlib_LIBRARIES)
# Check if header file exists and add it to the list.
MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
......@@ -151,12 +151,12 @@ LIBXML2_PLATFORM_C_TEST(HAVE___VA_COPY "Checking for __va_copy" DIRECT)
LIBXML2_PLATFORM_C_TEST(SUPPORT_IP6 "Checking for ipv6 support." DIRECT)
# Use VTK's zlib if we are building in the tree.
IF(VTK_ZLIB_LIBRARIES)
IF(vtkzlib_LIBRARIES)
SET(HAVE_VTK_ZLIB_H 1)
SET(HAVE_ZLIB_H 1)
ELSE(VTK_ZLIB_LIBRARIES)
ELSE(vtkzlib_LIBRARIES)
CHECK_INCLUDE_FILE_CONCAT("zlib.h" HAVE_ZLIB_H)
ENDIF(VTK_ZLIB_LIBRARIES)
ENDIF(vtkzlib_LIBRARIES)
IF(HAVE_SOCKLEN_T)
SET(XML_SOCKLEN_T "socklen_t")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment