Skip to content

Commit

Permalink
Replace find_dependency(PostgreSQL) with find_package(PostgreSQL REQU…
Browse files Browse the repository at this point in the history
…IRED) (#296)
  • Loading branch information
tt4g authored Mar 8, 2020
1 parent 207f348 commit cde0db9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ include(CheckSymbolExists)
include(CMakeDetermineCompileFeatures)
include(CheckCXXSourceCompiles)
include(CMakeFindDependencyMacro)
find_dependency(PostgreSQL)

if(NOT PostgreSQL_FOUND)
find_package(PostgreSQL REQUIRED)
endif()

check_function_exists("poll" PQXX_HAVE_POLL)

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# Generated from template './src/CMakeLists.txt.template'.
################################################################################
if(NOT PostgreSQL_INCLUDE_DIRS)
if(NOT PostgreSQL_FOUND)
find_package(PostgreSQL REQUIRED)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if(NOT PostgreSQL_INCLUDE_DIRS)
if(NOT PostgreSQL_FOUND)
find_package(PostgreSQL REQUIRED)
endif()

Expand Down
2 changes: 1 addition & 1 deletion test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# Generated from template './test/unit/CMakeLists.txt.template'.
# ##############################################################################
if(NOT PostgreSQL_INCLUDE_DIRS)
if(NOT PostgreSQL_FOUND)
find_package(PostgreSQL REQUIRED)
endif()

Expand Down
2 changes: 1 addition & 1 deletion test/unit/CMakeLists.txt.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if(NOT PostgreSQL_INCLUDE_DIRS)
if(NOT PostgreSQL_FOUND)
find_package(PostgreSQL REQUIRED)
endif()

Expand Down

0 comments on commit cde0db9

Please sign in to comment.