Skip to content

Commit

Permalink
CMake: Use imported target for LibXml2 to automatically link with Lib…
Browse files Browse the repository at this point in the history
…Xml2

dependencies.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920645 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 14, 2024
1 parent 5630314 commit 70f24f1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ OPTION(APU_HAVE_SQLITE3 "Build SQLite3 DBD driver" OFF)
OPTION(APR_HAS_LDAP "LDAP support" ON)
OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON)
OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF)
SET(LIBXML2_ICONV_INCLUDE_DIR ""
CACHE STRING "Directory with iconv include files for libxml2")
SET(LIBXML2_ICONV_LIBRARIES ""
CACHE STRING "iconv libraries to link with for libxml2")

SET(APU_INSTALL_BIN_DIR "bin" CACHE STRING "Install subdirectory for binary files")
SET(APU_INSTALL_LIB_DIR "lib" CACHE STRING "Install subdirectory for library files")
Expand Down Expand Up @@ -113,8 +109,8 @@ IF(APU_USE_EXPAT)
SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS})
SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES})
ELSE()
SET(XMLLIB_INCLUDE_DIR "${LIBXML2_INCLUDE_DIR};${LIBXML2_ICONV_INCLUDE_DIR}")
SET(XMLLIB_LIBRARIES "${LIBXML2_LIBRARIES};${LIBXML2_ICONV_LIBRARIES}")
SET(XMLLIB_INCLUDE_DIR)
SET(XMLLIB_LIBRARIES LibXml2::LibXml2)
ENDIF()


Expand Down

0 comments on commit 70f24f1

Please sign in to comment.