Skip to content
Snippets Groups Projects
Commit b9b95066 authored by Jarosław Staniek's avatar Jarosław Staniek
Browse files

Display cmake warning if libpqxx is not in version 3.x

+move checks for pgsql, mysql, tds, xbase dependencies to global area
BUG:300871
REVIEW:105874
FIXED-IN:2.5.1
parent 7453759a
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,34 @@ endif(WITH_WEBFORMS)
endif(FALSE)
add_subdirectory( kexiutils )
macro_optional_find_package(MySQL)
macro_log_feature(MYSQL_FOUND "libmysqlclient" "MySQL Client Library" "http://www.mysql.com" FALSE "" "Required by Kexi MySQL driver")
INCLUDE (FindPostgreSQL)
set (PQXX_MIN_VERSION "3.0.0")
set (PQXX_MAX_VERSION "4.0.0")
macro_optional_find_package(PostgreSQL)
macro_log_feature(POSTGRESQL_FOUND "libpq" "C application programmer's interface to PostgreSQL" "http://www.postgresql.org" FALSE "" "Required by Kexi PostgreSQL driver")
pkg_check_modules (PQXX libpqxx)
IF (POSTGRESQL_FOUND AND PQXX_FOUND)
IF (PQXX_VERSION VERSION_GREATER PQXX_MIN_VERSION AND PQXX_VERSION VERSION_LESS PQXX_MAX_VERSION)
macro_log_feature(PQXX_FOUND "libpqxx" "Official C++ client API for PostgreSQL" "http://pqxx.org/development/libpqxx/" FALSE "" "Required by Kexi PostgreSQL driver")
ELSE (PQXX_VERSION VERSION_GREATER PQXX_MIN_VERSION AND PQXX_VERSION VERSION_LESS PQXX_MAX_VERSION)
macro_log_feature(FALSE "libpqxx" "Official C++ client API for PostgreSQL, version >= ${PQXX_MIN_VERSION} and older than ${PQXX_MAX_VERSION}" "http://pqxx.org/development/libpqxx/" FALSE "" "Required by Kexi PostgreSQL driver")
ENDIF (PQXX_VERSION VERSION_GREATER PQXX_MIN_VERSION AND PQXX_VERSION VERSION_LESS PQXX_MAX_VERSION)
ENDIF (POSTGRESQL_FOUND AND PQXX_FOUND)
macro_optional_find_package(FreeTDS)
macro_log_feature(FREETDS_FOUND "FreeTDS" "Open source implementation of the TDS (Tabular Data Stream) protocol" "http://www.freetds.org" FALSE "" "Required by Kexi Sybase driver")
macro_optional_find_package(XBase)
macro_log_feature(XBASE_FOUND "XBase" "XBase compatible C++ class library" "http://linux.techass.com/projects/xdb" FALSE "" "Required by Kexi XBase driver")
add_subdirectory( kexidb )
add_subdirectory( core )
add_subdirectory( widget )
......
......@@ -6,30 +6,18 @@ IF (SQLITE_FOUND)
add_subdirectory( sqlite )
ENDIF (SQLITE_FOUND)
INCLUDE (FindMySQL)
IF (MYSQL_FOUND)
add_subdirectory( mySQL )
ENDIF (MYSQL_FOUND)
INCLUDE (FindPostgreSQL)
set (PQXX_MIN_VERSION "3.0.0")
set (PQXX_MAX_VERSION "4.0.0")
macro_optional_find_package(PostgreSQL)
pkg_check_modules (PQXX libpqxx)
IF (POSTGRESQL_FOUND AND PQXX_FOUND AND PQXX_VERSION VERSION_GREATER PQXX_MIN_VERSION AND PQXX_VERSION VERSION_LESS PQXX_MAX_VERSION)
add_subdirectory( pqxx )
add_subdirectory(pqxx)
ENDIF (POSTGRESQL_FOUND AND PQXX_FOUND AND PQXX_VERSION VERSION_GREATER PQXX_MIN_VERSION AND PQXX_VERSION VERSION_LESS PQXX_MAX_VERSION)
INCLUDE(FindFreeTDS)
IF (FREETDS_FOUND)
add_subdirectory(sybase)
ENDIF (FREETDS_FOUND)
INCLUDE(FindXBase)
IF(XBASE_FOUND)
add_subdirectory(xbase)
ENDIF(XBASE_FOUND)
......
......@@ -8,36 +8,20 @@ add_definitions(-DKDE_DEFAULT_DEBUG_AREA=44000)
add_subdirectory(txt)
macro_optional_find_package(MySQL)
macro_log_feature(MYSQL_FOUND "libmysqlclient" "MySQL Client Library" "http://www.mysql.com" FALSE "" "Required by Kexi MySQL Migration driver")
IF (MYSQL_FOUND)
macro_optional_add_subdirectory( mysql )
ENDIF (MYSQL_FOUND)
set (PQXX_MIN_VERSION "3.0.0")
set (PQXX_MAX_VERSION "4.0.0")
macro_optional_find_package(PostgreSQL)
macro_log_feature(POSTGRESQL_FOUND "libpq" "C application programmer's interface to PostgreSQL" "http://www.postgresql.org" FALSE "" "Required by Kexi PostgreSQL Migration driver")
pkg_check_modules (PQXX libpqxx)
macro_log_feature(PQXX_FOUND "libpqxx" "Official C++ client API for PostgreSQL" "http://pqxx.org/development/libpqxx/" FALSE "" "Required by Kexi PostgreSQL Migration driver")
IF (POSTGRESQL_FOUND AND PQXX_FOUND AND PQXX_VERSION VERSION_GREATER PQXX_MIN_VERSION AND PQXX_VERSION VERSION_LESS PQXX_MAX_VERSION)
macro_optional_add_subdirectory( pqxx )
macro_optional_add_subdirectory( pqxx )
ENDIF (POSTGRESQL_FOUND AND PQXX_FOUND AND PQXX_VERSION VERSION_GREATER PQXX_MIN_VERSION AND PQXX_VERSION VERSION_LESS PQXX_MAX_VERSION)
macro_optional_find_package(FreeTDS)
macro_log_feature(FREETDS_FOUND "FreeTDS" "Open source implementation of the TDS (Tabular Data Stream) protocol" "http://www.freetds.org" FALSE "" "Required by Kexi Sybase Migration driver")
IF(FREETDS_FOUND)
macro_optional_add_subdirectory( sybase )
macro_optional_add_subdirectory(sybase)
ENDIF(FREETDS_FOUND)
macro_optional_find_package(XBase)
macro_log_feature(XBASE_FOUND "XBase" "XBase compatible C++ class library" "http://linux.techass.com/projects/xdb/" FALSE "" "Required by Kexi XBase Migration driver")
IF(XBASE_FOUND)
macro_optional_add_subdirectory( xbase )
macro_optional_add_subdirectory(xbase)
ENDIF(XBASE_FOUND)
macro_optional_find_package(GLIB2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment