diff --git a/CMakeLists.txt b/CMakeLists.txt index 9346b23..88191ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,12 @@ check_include_file_cxx(postgresql/libpq-fe.h HAS_POSTGRES) if (HAS_POSTGRES) add_definitions(-DHAS_POSTGRES) else() - message("No libpq-fe.h file found. Postgres driver disabled") + check_include_file_cxx(libpq-fe.h HAS_POSTGRES) + if (HAS_POSTGRES) + add_definitions(-DHAS_POSTGRES) + else() + message("No libpq-fe.h file found. Postgres driver disabled") + endif() endif()