apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1519267 - in /apr/apr-util/branches/1.5.x: CMakeLists.txt README.cmake
Date Sun, 01 Sep 2013 12:42:19 GMT
Author: trawick
Date: Sun Sep  1 12:42:19 2013
New Revision: 1519267

URL: http://svn.apache.org/r1519267
Log:
Let the location of libapr*.lib and APR include directory
default to the same prefix where this package is installed,
generally eliminating two required settings for users.

Axe the display of "Library files for XML" in the configuration
status, since that varies only with APR trunk.

Modified:
    apr/apr-util/branches/1.5.x/CMakeLists.txt
    apr/apr-util/branches/1.5.x/README.cmake

Modified: apr/apr-util/branches/1.5.x/CMakeLists.txt
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/CMakeLists.txt?rev=1519267&r1=1519266&r2=1519267&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/CMakeLists.txt (original)
+++ apr/apr-util/branches/1.5.x/CMakeLists.txt Sun Sep  1 12:42:19 2013
@@ -21,10 +21,21 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 
 FIND_PACKAGE(OpenSSL)
 
-OPTION(APU_HAVE_CRYPTO      "Crypto support"               OFF)
-OPTION(APU_HAVE_ODBC        "Build ODBC DBD driver"        ON)
-OPTION(APR_SHOW_SETTINGS    "Show the build configuration" ON)
-OPTION(APR_BUILD_TESTAPR    "Build the test suite"         OFF)
+OPTION(APU_HAVE_CRYPTO      "Crypto support"                            OFF)
+OPTION(APU_HAVE_ODBC        "Build ODBC DBD driver"                     ON)
+OPTION(APR_SHOW_SETTINGS    "Show the build configuration"              ON)
+OPTION(APR_BUILD_TESTAPR    "Build the test suite"                      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)
@@ -261,7 +272,8 @@ IF(APR_SHOW_SETTINGS)
   MESSAGE(STATUS "")
   MESSAGE(STATUS "  Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
   MESSAGE(STATUS "  C compiler ...................... : ${CMAKE_C_COMPILER}")
+  MESSAGE(STATUS "  APR include directory ........... : ${APR_INCLUDE_DIR}")
+  MESSAGE(STATUS "  APR libraries ................... : ${APR_LIBRARIES}")
   MESSAGE(STATUS "  DBD ODBC driver ................. : ${APU_HAVE_ODBC}")
-  MESSAGE(STATUS "  Library files for XML ........... : ${XMLLIB_LIBRARIES}")
   MESSAGE(STATUS "  Build test suite ................ : ${APR_BUILD_TESTAPR}")
 ENDIF(APR_SHOW_SETTINGS)

Modified: apr/apr-util/branches/1.5.x/README.cmake
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/README.cmake?rev=1519267&r1=1519266&r2=1519267&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/README.cmake (original)
+++ apr/apr-util/branches/1.5.x/README.cmake Sun Sep  1 12:42:19 2013
@@ -59,11 +59,15 @@ How to build
 
 5. cmake -G "some backend, like 'NMake Makefiles'"
      -DCMAKE_INSTALL_PREFIX=d:/path/to/aprinst
-     -DAPR_INCLUDE_DIR=d:/path/to/apr1inst/include
-     -DAPR_LIBRARIES=d:/path/to/apr1inst/lib/libapr-1.lib
      -DAPR-Util-specific-flags
      d:/path/to/aprutilsource
 
+   If APR 1.x was installed to a different directory than APR-Util,
+   also pass these additional arguments:
+
+     -DAPR_INCLUDE_DIR=d:/path/to/apr1inst/include
+     -DAPR_LIBRARIES=d:/path/to/apr1inst/lib/libapr-1.lib
+
    Alternately, use cmake-gui and update settings in the GUI.
 
    APR-Util feature flags:



Mime
View raw message