Add option to create 'minimal' build without any third-party library dependencies. This is usable for projects like TomcatNative that do not require APU xml, dbd, or xlate API. Turned OFF by default
@@ -19,11 +19,16 @@ PROJECT(APR C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-# Either Expat or LibXml2 is required; the others are optional
+OPTION(APR_MINIMAL_BUILD "Create minimal APR build" OFF)
+IF(NOT APR_MINIMAL_BUILD)
FIND_PACKAGE(EXPAT)
FIND_PACKAGE(LibXml2)
FIND_PACKAGE(OpenSSL)
FIND_PACKAGE(Iconv)
+ OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON)
+ELSE()
+ OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" OFF)
+ENDIF()
SET(apr_name apr-2)
SET(apr_libname libapr-2)
@@ -54,7 +59,6 @@ ENDIF()
OPTION(APR_INSTALL_PRIVATE_H "Install selected private .h files (for httpd)" OFF)
OPTION(APU_HAVE_CRYPTO "Crypto support" OFF)
-OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON)
OPTION(APU_HAVE_ICONV "Xlate support" OFF)
OPTION(APR_HAVE_IPV6 "IPv6 support" ON)
OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON)
