Skip to content

Commit

Permalink
CMake: Use #cmakedefine01 for APU_USE_EXPAT, APU_USE_LIBXML2 and APU_…
Browse files Browse the repository at this point in the history
…USE_XMLLITE.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1920851 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 23, 2024
1 parent 0ae68f0 commit d148082
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,6 @@ ELSE()
ADD_COMPILE_DEFINITIONS(APR_HAVE_MODULAR_DSO=0)
ENDIF()

# create 1-or-0 representation of feature tests for apr.h

SET(apu_use_libxml2_10 0)
SET(apu_use_expat_10 0)
SET(apu_use_xmllite_10 0)

IF(APU_USE_EXPAT)
SET(apu_use_expat_10 1)
ELSEIF(APU_USE_LIBXML2)
SET(apu_use_libxml2_10 1)
ELSE(APU_USE_XMLLITE)
SET(apu_use_xmllite_10 1)
ENDIF()

# Read current version.
FILE(STRINGS include/apr_version.h VERSION_STRINGS REGEX "#define (APR_MAJOR_VERSION|APR_MINOR_VERSION|APR_PATCH_VERSION)")

Expand Down
6 changes: 3 additions & 3 deletions include/apr.hwc
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,9 @@ typedef int apr_wait_t;
#cmakedefine01 APU_HAVE_ICONV
#define APR_HAS_XLATE (APU_HAVE_ICONV)

#define APU_USE_EXPAT @apu_use_expat_10@
#define APU_USE_LIBXML2 @apu_use_libxml2_10@
#define APU_USE_XMLLITE @apu_use_xmllite_10@
#cmakedefine01 APU_USE_EXPAT
#cmakedefine01 APU_USE_LIBXML2
#cmakedefine01 APU_USE_XMLLITE

/** @} */

Expand Down

0 comments on commit d148082

Please sign in to comment.