svn commit: r1920811 - in /apr/apr-util/branches/1.7.x: ./ CMakeLists.txt README.cmake include/apu.hwc
[email protected] Fri, 20 Sep 2024 17:44:16 -0000
Newsgroups
gmane.comp.apache.apr.cvs
Message-ID
<[email protected] >
Author: ivan
Date: Fri Sep 20 17:44:16 2024
New Revision: 1920811
URL: http://svn.apache.org/viewvc?rev=1920811&view=rev
Log:
Merged r1920712 from apr/trunk:
* CMake: Add support to build DBD PostgreSQL module.
Modified:
apr/apr-util/branches/1.7.x/ (props changed)
apr/apr-util/branches/1.7.x/CMakeLists.txt
apr/apr-util/branches/1.7.x/README.cmake
apr/apr-util/branches/1.7.x/include/apu.hwc
Propchange: apr/apr-util/branches/1.7.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1920712
Modified: apr/apr-util/branches/1.7.x/CMakeLists.txt
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/CMakeLists.txt?rev=1920811&r1=1920810&r2=1920811&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/CMakeLists.txt (original)
+++ apr/apr-util/branches/1.7.x/CMakeLists.txt Fri Sep 20 17:44:16 2024
@@ -39,6 +39,7 @@ CMAKE_DEPENDENT_OPTION(APU_DSO_BUILD "Us
OPTION(APU_HAVE_CRYPTO "Crypto support" OFF)
OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON)
OPTION(APU_HAVE_SQLITE3 "Build SQLite3 DBD driver" OFF)
+OPTION(APU_HAVE_PGSQL "Build PostgreSQL DBD driver" OFF)
OPTION(APR_HAS_LDAP "LDAP support" OFF)
OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON)
OPTION(APU_BUILD_TEST "Build the test suite" OFF)
@@ -74,6 +75,10 @@ IF(APU_HAVE_SQLITE3)
FIND_PACKAGE(SQLite3 REQUIRED)
ENDIF()
+IF(APU_HAVE_PGSQL)
+ FIND_PACKAGE(PostgreSQL REQUIRED)
+ENDIF()
+
# create 1-or-0 representation of feature tests for apu.h
SET(apu_have_apr_iconv_10 0) # not yet implemented
@@ -321,6 +326,16 @@ IF(APU_HAVE_SQLITE3)
"SQLite::SQLite3")
ENDIF()
+IF(APU_HAVE_PGSQL)
+ LIST(APPEND dbd_drivers pgsql)
+
+ ADD_APU_MODULE(apr_dbd_pgsql-2 "apr_dbd_pgsql"
+ "dbd/apr_dbd_pgsql.c"
+ "PostgreSQL::PostgreSQL")
+
+ ADD_COMPILE_DEFINITIONS(HAVE_LIBPQ_FE_H)
+ENDIF()
+
ADD_LIBRARY(libaprutil-1 ${APR_SOURCES} ${APU_EXTRA_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED})
LIST(APPEND install_targets libaprutil-1)
TARGET_LINK_LIBRARIES(libaprutil-1
@@ -437,6 +452,7 @@ MESSAGE(STATUS " Directory for includ
MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
MESSAGE(STATUS " DBD ODBC driver ................. : ${APU_HAVE_ODBC}")
MESSAGE(STATUS " DBD SQLite3 driver .............. : ${APU_HAVE_SQLITE3}")
+MESSAGE(STATUS " DBD PostgreSQL .................. : ${APU_HAVE_PGSQL}")
MESSAGE(STATUS " APU_HAVE_CRYPTO ................. : ${APU_HAVE_CRYPTO}")
MESSAGE(STATUS " APR_HAS_LDAP .................... : ${APR_HAS_LDAP}")
MESSAGE(STATUS " Use Expat ....................... : ${APU_USE_EXPAT}")
Modified: apr/apr-util/branches/1.7.x/README.cmake
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/README.cmake?rev=1920811&r1=1920810&r2=1920811&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/README.cmake (original)
+++ apr/apr-util/branches/1.7.x/README.cmake Fri Sep 20 17:44:16 2024
@@ -79,6 +79,8 @@ How to build
Default: OFF
APU_HAVE_ODBC Build ODBC DBD driver
Default: ON
+ APU_HAVE_PGSQL Build PostgreSQL DBD driver
+ Default: OFF
APU_BUILD_TEST Build APR-Util test suite
Default: OFF
TEST_STATIC_LIBS Build the test suite to test the APR static
@@ -114,7 +116,6 @@ Known Bugs and Limitations
. APU_HAVE_NDBM
. APU_HAVE_DB
+ DBD:
- . APU_HAVE_PGSQL
. APU_HAVE_MYSQL
. APU_HAVE_SQLITE3
. APU_HAVE_SQLITE2
Modified: apr/apr-util/branches/1.7.x/include/apu.hwc
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/include/apu.hwc?rev=1920811&r1=1920810&r2=1920811&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/include/apu.hwc (original)
+++ apr/apr-util/branches/1.7.x/include/apu.hwc Fri Sep 20 17:44:16 2024
@@ -124,7 +124,6 @@
* Win32 always has odbc (it's always installed)
*/
#ifndef APU_DSO_MODULE_BUILD
-#define APU_HAVE_PGSQL 0
#define APU_HAVE_MYSQL 0
#define APU_HAVE_SQLITE2 0
#define APU_HAVE_ORACLE 0
@@ -132,6 +131,7 @@
#cmakedefine01 APU_HAVE_ODBC
#cmakedefine01 APU_HAVE_SQLITE3
+#cmakedefine01 APU_HAVE_PGSQ
#cmakedefine01 APU_HAVE_CRYPTO
#ifndef APU_DSO_MODULE_BUILD