# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Read README.cmake before using this.
PROJECT(APR-Util C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
FIND_PACKAGE(OpenSSL)
FIND_PACKAGE(EXPAT)
OPTION(APU_HAVE_CRYPTO "Crypto support" OFF)
OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON)
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)
OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF)
SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files")
SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with")
IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h")
MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.")
ENDIF()
FOREACH(onelib ${APR_LIBRARIES})
IF(NOT EXISTS ${onelib})
MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.")
ENDIF()
ENDFOREACH()
IF(APU_HAVE_CRYPTO)
IF(NOT OPENSSL_FOUND)
MESSAGE(FATAL_ERROR "OpenSSL is the only supported crypto implementation, and it wasn't found!")
ENDIF()
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)
IF(APU_HAVE_CRYPTO)
SET(apu_have_crypto_10 1)
ENDIF()
IF(APR_HAS_LDAP)
SET(apr_has_ldap_10 1)
ENDIF()
IF(NOT EXPAT_FOUND)
MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!")
ENDIF()
SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS})
SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES})
SET(LDAP_LIBRARIES)
IF(APR_HAS_LDAP)
SET(LDAP_LIBRARIES wldap32)
ENDIF()
CONFIGURE_FILE(include/apu.hwc
${PROJECT_BINARY_DIR}/apu.h)
CONFIGURE_FILE(include/apr_ldap.hwc
${PROJECT_BINARY_DIR}/apr_ldap.h)
# "COPYONLY" just because anything else isn't implemented ;)
CONFIGURE_FILE(include/private/apu_config.hw
${PROJECT_BINARY_DIR}/apu_config.h
COPYONLY)
CONFIGURE_FILE(include/private/apu_select_dbm.hw
${PROJECT_BINARY_DIR}/apu_select_dbm.h
COPYONLY)
CONFIGURE_FILE(include/apu_want.hw
${PROJECT_BINARY_DIR}/apu_want.h
COPYONLY)
# Generated .h files are stored in PROJECT_BINARY_DIR, not the
# source tree.
#
# BROKEN: not searching PROJECT_BINARY_DIR first, so you have to
# manually delete apu.h in PROJECT_SOURCE_DIR/include if
# you've generated apu.h before using a different build
SET(APR_INCLUDE_DIRECTORIES
${PROJECT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/private
${APR_INCLUDE_DIR}
)
INCLUDE_DIRECTORIES(${APR_INCLUDE_DIRECTORIES} ${XMLLIB_INCLUDE_DIR})
SET(APR_PUBLIC_HEADERS_STATIC
include/apr_anylock.h
include/apr_base64.h
include/apr_buckets.h
include/apr_crypto.h
include/apr_date.h
include/apr_dbd.h
include/apr_dbm.h
include/apr_hooks.h
include/apr_ldap_init.h
include/apr_ldap_option.h
include/apr_ldap_rebind.h
include/apr_ldap_url.h
include/apr_md4.h
include/apr_md5.h
include/apr_memcache.h
include/apr_optional.h
include/apr_optional_hooks.h
include/apr_queue.h
include/apr_redis.h
include/apr_reslist.h
include/apr_rmm.h
include/apr_sdbm.h
include/apr_sha1.h
include/apr_siphash.h
include/apr_strmatch.h
include/apr_thread_pool.h
include/apr_uri.h
include/apr_uuid.h
include/apr_xlate.h
include/apr_xml.h
include/apu_errno.h
include/apu_version.h
)
# apu_config.h and apu_select_dbm.h are private
SET(APR_PUBLIC_HEADERS_GENERATED
${PROJECT_BINARY_DIR}/apu.h
${PROJECT_BINARY_DIR}/apr_ldap.h
${PROJECT_BINARY_DIR}/apu_want.h
)
SET(APR_SOURCES
buckets/apr_brigade.c
buckets/apr_buckets.c
buckets/apr_buckets_alloc.c
buckets/apr_buckets_eos.c
buckets/apr_buckets_file.c
buckets/apr_buckets_flush.c
buckets/apr_buckets_heap.c
buckets/apr_buckets_mmap.c
buckets/apr_buckets_pipe.c
buckets/apr_buckets_pool.c
buckets/apr_buckets_refcount.c
buckets/apr_buckets_simple.c
buckets/apr_buckets_socket.c
crypto/apr_crypto.c
crypto/apr_md4.c
crypto/apr_md5.c
crypto/apr_passwd.c
crypto/apr_sha1.c
crypto/apr_siphash.c
crypto/crypt_blowfish.c
crypto/getuuid.c
crypto/uuid.c
dbd/apr_dbd.c
dbm/apr_dbm.c
dbm/apr_dbm_sdbm.c
dbm/sdbm/sdbm.c
dbm/sdbm/sdbm_hash.c
dbm/sdbm/sdbm_lock.c
dbm/sdbm/sdbm_pair.c
encoding/apr_base64.c
hooks/apr_hooks.c
memcache/apr_memcache.c
misc/apr_date.c
misc/apr_queue.c
misc/apr_reslist.c
misc/apr_rmm.c
misc/apr_thread_pool.c
misc/apu_dso.c
misc/apu_version.c
redis/apr_redis.c
strmatch/apr_strmatch.c
uri/apr_uri.c
xlate/xlate.c
xml/apr_xml.c
)
IF(APR_HAS_LDAP)
SET(APR_SOURCES ${APR_SOURCES} ldap/apr_ldap_stub.c ldap/apr_ldap_url.c)
ENDIF()
SET(APR_TEST_SOURCES
test/abts.c
test/testbuckets.c
test/testcrypto.c
test/testdate.c
test/testdbd.c
test/testdbm.c
test/testldap.c
test/testmd4.c
test/testmd5.c
test/testmemcache.c
test/testpass.c
test/testqueue.c
test/testredis.c
test/testreslist.c
test/testrmm.c
test/testsiphash.c
test/teststrmatch.c
test/testuri.c
test/testutil.c
test/testuuid.c
test/testxlate.c
test/testxml.c
)
SET(install_targets)
SET(install_bin_pdb)
SET(dbd_drivers)
# Note: The WINNT definition on some targets is used only by libaprutil.rc.
# libaprutil-1 is shared, aprutil-1 is static
ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc)
SET(install_targets ${install_targets} libaprutil-1)
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb)
TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES})
SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_IMPORT;XML_STATIC;WINNT")
ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED})
SET(install_targets ${install_targets} aprutil-1)
TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES})
SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC")
IF(APU_HAVE_CRYPTO)
IF(NOT OPENSSL_FOUND)
MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build")
ENDIF()
ADD_LIBRARY(apr_crypto_openssl-1 SHARED crypto/apr_crypto_openssl.c libaprutil.rc)
SET(install_targets ${install_targets} apr_crypto_openssl-1)
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb)
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}")
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT")
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_crypto_openssl")
TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES})
ENDIF(
没有合适的资源?快使用搜索试试~ 我知道了~
apr-util-1.6.3.tar.gz
需积分: 0 0 下载量 10 浏览量
2023-10-19
15:02:23
上传
评论
收藏 544KB GZ 举报
温馨提示
共254个文件
c:86个
h:45个
dsp:17个
apr-util-1.6.3.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
apr-util-1.6.3.tar.gz (254个子文件)
buildconf 3KB
apr_dbd_oracle.c 72KB
apr_dbd_odbc.c 61KB
testcrypto.c 55KB
apr_memcache.c 48KB
apr_redis.c 40KB
apr_dbd_pgsql.c 39KB
apr_uri.c 39KB
apr_dbd_mysql.c 38KB
apr_crypto_nss.c 34KB
crypt_blowfish.c 31KB
apr_xml.c 31KB
apr_thread_pool.c 30KB
apr_crypto_openssl.c 29KB
apr_crypto_commoncrypto.c 27KB
apr_dbd_sqlite3.c 24KB
apr_ldap_option.c 23KB
apr_brigade.c 23KB
apr_dbd_freetds.c 22KB
apr_crypto.c 21KB
apr_md5.c 21KB
apr_date.c 20KB
apr_dbd.c 19KB
apr_ldap_url.c 19KB
testmemcache.c 19KB
testbuckets.c 17KB
sdbm.c 16KB
testredis.c 16KB
apr_dbd_sqlite2.c 14KB
dbd.c 14KB
apr_reslist.c 14KB
apr_rmm.c 13KB
xlate.c 13KB
apr_md4.c 13KB
apr_hooks.c 12KB
apr_sha1.c 11KB
apr_queue.c 11KB
apr_dbm_berkeleydb.c 10KB
testuri.c 10KB
abts.c 10KB
apr_ldap_rebind.c 10KB
apr_base64.c 10KB
apr_dbm.c 9KB
testreslist.c 9KB
apr_buckets_file.c 8KB
apr_ldap_init.c 7KB
testldap.c 7KB
testdate.c 7KB
testdbd.c 7KB
apr_buckets_alloc.c 7KB
sdbm_pair.c 6KB
apr_dbm_gdbm.c 6KB
testpass.c 6KB
apr_passwd.c 6KB
testdbm.c 6KB
getuuid.c 6KB
apu_dso.c 6KB
testxml.c 6KB
apr_dbm_ndbm.c 6KB
apr_dbm_sdbm.c 6KB
apr_siphash.c 6KB
testrmm.c 5KB
testsiphash.c 5KB
apr_buckets_pool.c 5KB
apr_ldap_stub.c 4KB
apr_buckets_simple.c 4KB
testmd4.c 4KB
apr_buckets_pipe.c 4KB
apr_buckets_mmap.c 4KB
testxlate.c 4KB
apr_buckets_socket.c 4KB
apr_strmatch.c 4KB
testmd5.c 4KB
testqueue.c 3KB
uuid.c 3KB
teststrmatch.c 3KB
apr_buckets_heap.c 3KB
sdbm_lock.c 3KB
apr_buckets_refcount.c 2KB
testutil.c 2KB
sdbm_hash.c 2KB
apr_buckets_flush.c 2KB
apr_buckets_eos.c 2KB
testuuid.c 2KB
apr_buckets.c 2KB
apu_version.c 1KB
nw_misc.c 417B
CHANGES 4KB
README.cmake 5KB
build.conf 2KB
doxygen.conf 811B
configure 707KB
aprutil.dep 9KB
libaprutil.dep 7KB
apr_ldap.dep 939B
apr_dbm_db.dep 391B
apr_crypto_nss.dep 388B
apr_dbd_mysql.dep 382B
apr_dbm_gdbm.dep 360B
apr_crypto_openssl.dep 359B
共 254 条
- 1
- 2
- 3
资源评论
Lucifer_wei
- 粉丝: 133
- 资源: 16
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功