Skip to content

Commit

Permalink
CMake: Use #cmakedefine01 where it makes sense.
Browse files Browse the repository at this point in the history
* CMakeLists.txt: Do not set apu_have_crypto_10 and apr_has_ldap_10.

* include/apr_ldap.hwc: Use #cmakedefine01 for APR_HAS_LDAP.

* include/apu.hwc: Use #cmakedefine01 for APU_HAVE_CRYPTO.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920357 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 1, 2024
1 parent f0a5a9f commit 84c1417
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,16 @@ ENDIF()

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

SET(apu_have_crypto_10 0)
SET(apu_have_apr_iconv_10 0) # not yet implemented
SET(apr_has_ldap_10 0)
SET(apu_use_libxml2_10 0)
SET(apu_use_expat_10 0)

IF(APU_HAVE_CRYPTO)
SET(apu_have_crypto_10 1)
ENDIF()

IF(APU_USE_EXPAT)
SET(apu_use_expat_10 1)
ELSE()
SET(apu_use_libxml2_10 1)
ENDIF()

IF(APR_HAS_LDAP)
SET(apr_has_ldap_10 1)
ENDIF()

SET(LDAP_LIBRARIES)
IF(APR_HAS_LDAP)
SET(LDAP_LIBRARIES wldap32)
Expand Down
2 changes: 1 addition & 1 deletion include/apr_ldap.hwc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

/* this will be defined if LDAP support was compiled into apr-util */
#define APR_HAS_LDAP @apr_has_ldap_10@
#cmakedefine01 APR_HAS_LDAP

/* identify the LDAP toolkit used */
#define APR_HAS_NETSCAPE_LDAPSDK 0
Expand Down
2 changes: 1 addition & 1 deletion include/apu.hwc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
#define APU_HAVE_ODBC 1
#endif

#define APU_HAVE_CRYPTO @apu_have_crypto_10@
#cmakedefine01 APU_HAVE_CRYPTO

#ifndef APU_DSO_MODULE_BUILD
#define APU_HAVE_OPENSSL 0
Expand Down

0 comments on commit 84c1417

Please sign in to comment.