Skip to content

Commit

Permalink
If on android force POSTGRES_INCLUDE_DIR and POSTGRES_LIBRARY, needs …
Browse files Browse the repository at this point in the history
…to be bette but works
  • Loading branch information
mbernasocchi committed Aug 26, 2011
1 parent 5cba125 commit 76244bc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/FindPostgres.cmake
Expand Up @@ -14,7 +14,12 @@
# POSTGRES_INCLUDE_DIR
# POSTGRES_LIBRARY

IF(WIN32)
IF(ANDROID)
SET(POSTGRES_INCLUDE_DIR ${POSTGRES_INCLUDE_DIR} CACHE STRING INTERNAL)
SET(POSTGRES_LIBRARY ${PG_TMP}/libpq.so CACHE STRING INTERNAL)
ENDIF(ANDROID)

IF(WIN32 AND NOT ANDROID)
IF (NOT POSTGRES_INCLUDE_DIR)
FIND_PATH(POSTGRES_INCLUDE_DIR libpq-fe.h
/usr/local/include
Expand Down Expand Up @@ -65,7 +70,8 @@ ELSE(WIN32)
ENDIF(POSTGRES_CONFIG)

ENDIF(UNIX)
ENDIF(WIN32)
ENDIF(WIN32 AND NOT ANDROID)


IF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
SET(POSTGRES_FOUND TRUE)
Expand Down

0 comments on commit 76244bc

Please sign in to comment.