aboutsummaryrefslogtreecommitdiff
path: root/modules/FindPostgreSQL.cmake
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2007-08-14 07:07:01 +0000
committerLaurent Montel <montel@kde.org>2007-08-14 07:07:01 +0000
commit90ff64277a72c3be7b1dd93827d2ab7f13e5c4f2 (patch)
tree99ef887f198b3662143972123638d195e93c37f8 /modules/FindPostgreSQL.cmake
parent27ceca57128f058e899f170716fd70b2b379a303 (diff)
downloadextra-cmake-modules-90ff64277a72c3be7b1dd93827d2ab7f13e5c4f2.tar.gz
extra-cmake-modules-90ff64277a72c3be7b1dd93827d2ab7f13e5c4f2.tar.bz2
Use find_package_handle_standard_args
Remove not necessary path svn path=/trunk/KDE/kdelibs/; revision=699875
Diffstat (limited to 'modules/FindPostgreSQL.cmake')
-rw-r--r--modules/FindPostgreSQL.cmake18
1 files changed, 4 insertions, 14 deletions
diff --git a/modules/FindPostgreSQL.cmake b/modules/FindPostgreSQL.cmake
index d72aae8c..49acf7be 100644
--- a/modules/FindPostgreSQL.cmake
+++ b/modules/FindPostgreSQL.cmake
@@ -22,25 +22,15 @@ find_path(POSTGRESQL_INCLUDE_DIR libpq-fe.h
/usr/local/include/pgsql
)
-find_library(POSTGRESQL_LIBRARIES NAMES pq
- PATHS
- /usr/lib
- /usr/local/lib
-)
+find_library(POSTGRESQL_LIBRARIES NAMES pq)
if(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES)
set(POSTGRESQL_FOUND TRUE)
endif(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES)
-if(POSTGRESQL_FOUND)
- if (NOT PostgreSQL_FIND_QUIETLY)
- message(STATUS "Found PostgreSQL: ${POSTGRESQL_INCLUDE_DIR}, ${POSTGRESQL_LIBRARIES}")
- endif(NOT PostgreSQL_FIND_QUIETLY)
-else(POSTGRESQL_FOUND)
- if (PostgreSQL_FIND_REQUIRED)
- message(FATAL_ERROR "PostgreSQL not found.")
- endif(PostgreSQL_FIND_REQUIRED)
-endif(POSTGRESQL_FOUND)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PostgreSQL DEFAULT_MSG
+ POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARIES )
mark_as_advanced(POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARIES)