summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2013-10-03 22:39:14 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2013-10-03 22:39:14 +0000
commit88395cb2c861f054cf5a9b425fa8f5b32e2b72e2 (patch)
tree84cd0c4ac1880baddd4cb575066f7f701e102136
parent818f2621af9a3ff8d13f98addf5c7128a7387fd1 (diff)
downloadlibapr-88395cb2c861f054cf5a9b425fa8f5b32e2b72e2.tar.gz
Fix r1528923: A back-level file was brought forward from 1.4.x
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1529021 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CMakeLists.txt55
1 files changed, 40 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c21acb15..fa38570d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
OPTION(APR_INSTALL_PRIVATE_H "Install selected private .h files (for httpd)" OFF)
OPTION(APR_HAVE_IPV6 "IPv6 support" ON)
-OPTION(APR_SHOW_SETTINGS "Show the build configuration" ON)
+OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON)
OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF)
SET(MIN_WINDOWS_VER "Vista"
CACHE STRING "Minimum Windows version")
@@ -238,18 +238,33 @@ SET(APR_TEST_SOURCES
)
SET(install_targets)
+SET(install_bin_pdb)
+SET(install_lib_pdb)
# libapr-1 is shared, apr-1 is static
-ADD_LIBRARY(libapr-1 SHARED ${APR_HEADERS} ${APR_SOURCES} ${PROJECT_BINARY_DIR}/apr.h)
+ADD_LIBRARY(libapr-1 SHARED ${APR_HEADERS} ${APR_SOURCES} ${PROJECT_BINARY_DIR}/apr.h libapr.rc)
SET(install_targets ${install_targets} libapr-1)
+SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libapr-1.pdb)
TARGET_LINK_LIBRARIES(libapr-1 ${APR_SYSTEM_LIBS})
SET_TARGET_PROPERTIES(libapr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_EXPORT")
ADD_LIBRARY(apr-1 STATIC ${APR_HEADERS} ${APR_SOURCES} ${PROJECT_BINARY_DIR}/apr.h)
SET(install_targets ${install_targets} apr-1)
+SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/apr-1.pdb)
TARGET_LINK_LIBRARIES(apr-1 ${APR_SYSTEM_LIBS})
SET_TARGET_PROPERTIES(apr-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC")
+# libaprapp-1 and aprapp-1 are static
+ADD_LIBRARY(libaprapp-1 STATIC ${APR_HEADERS} ${PROJECT_BINARY_DIR}/apr.h misc/win32/apr_app.c misc/win32/internal.c)
+SET(install_targets ${install_targets} libaprapp-1)
+SET(install_lib_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprapp-1.pdb)
+SET_TARGET_PROPERTIES(libaprapp-1 PROPERTIES COMPILE_DEFINITIONS APR_APP)
+
+ADD_LIBRARY(aprapp-1 STATIC ${APR_HEADERS} ${PROJECT_BINARY_DIR}/apr.h misc/win32/apr_app.c)
+SET(install_targets ${install_targets} aprapp-1)
+SET(install_lib_pdb ${install_lib_pdb} ${PROJECT_BINARY_DIR}/aprapp-1.pdb)
+SET_TARGET_PROPERTIES(libaprapp-1 PROPERTIES COMPILE_DEFINITIONS "APR_DECLARE_STATIC;APR_APP")
+
IF(APR_BUILD_TESTAPR)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/data)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/test/data/file_datafile.txt ${PROJECT_BINARY_DIR}/data/file_datafile.txt)
@@ -304,6 +319,16 @@ INSTALL(TARGETS ${install_targets}
ARCHIVE DESTINATION lib
)
+IF(INSTALL_PDB)
+ INSTALL(FILES ${install_bin_pdb}
+ DESTINATION bin
+ CONFIGURATIONS RelWithDebInfo Debug)
+
+ INSTALL(FILES ${install_lib_pdb}
+ DESTINATION lib
+ CONFIGURATIONS RelWithDebInfo Debug)
+ENDIF()
+
INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include)
IF(APR_INSTALL_PRIVATE_H)
# Kludges for unexpected dependencies of httpd 2.x, not installed by default
@@ -317,16 +342,16 @@ IF(APR_INSTALL_PRIVATE_H)
INSTALL(FILES include/arch/apr_private_common.h DESTINATION include/arch)
ENDIF()
-IF(APR_SHOW_SETTINGS)
- STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
- MESSAGE(STATUS "")
- MESSAGE(STATUS "")
- MESSAGE(STATUS "APR configuration summary:")
- MESSAGE(STATUS "")
- MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
- MESSAGE(STATUS " IPv6 ............................ : ${APR_HAVE_IPV6}")
- MESSAGE(STATUS " Minimum Windows version ......... : ${MIN_WINDOWS_VER}")
- MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}")
- MESSAGE(STATUS " Install private .h for httpd .... : ${APR_INSTALL_PRIVATE_H}")
-ENDIF(APR_SHOW_SETTINGS)
+STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
+MESSAGE(STATUS "")
+MESSAGE(STATUS "")
+MESSAGE(STATUS "APR configuration summary:")
+MESSAGE(STATUS "")
+MESSAGE(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}")
+MESSAGE(STATUS " Install .pdb (if available)...... : ${INSTALL_PDB}")
+MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
+MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
+MESSAGE(STATUS " IPv6 ............................ : ${APR_HAVE_IPV6}")
+MESSAGE(STATUS " Minimum Windows version ......... : ${MIN_WINDOWS_VER}")
+MESSAGE(STATUS " Build test suite ................ : ${APR_BUILD_TESTAPR}")
+MESSAGE(STATUS " Install private .h for httpd .... : ${APR_INSTALL_PRIVATE_H}")