Re: [CMake] FindPostgreSQL.cmake won't work on ubuntu

2012-12-18 Thread Ilia Choly

On 12-12-17 03:11 PM, Matthew Woehlke wrote:

On 2012-12-17 14:55, Ilia Choly wrote:

I'm trying to get the `FindPostgreSQL` module to find
`/usr/include/postgresql/libpq-fe.h`.

This is the error I get:

 CMake Error at
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
(MESSAGE):
   Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR)
(found
   version 9.2.2)


Is pg_config in your PATH? (Do you have the necessary -dev package(s) 
installed?)


From a cursory look at the find module, it looks like having pg_config 
in your path should be all that is needed.




The pg_config binary is in my path but looking at he module it doesn't 
look like it's being used.


After a bit more debugging I figured out that it's getting stuck here 
trying to find pg_type.h
This file is located in /usr/include/postgresql/catalog/pg_types.h but 
the module is expecting to find it in 
/usr/postgresql/server/catalog/pg_types.h


find_path(PostgreSQL_TYPE_INCLUDE_DIR
  NAMES catalog/pg_type.h
  PATHS
   # Look in other places.
   ${PostgreSQL_ROOT_DIRECTORIES}
  PATH_SUFFIXES
pgsql/server
postgresql/server
include/server
  # Help the user find it if we cannot.
  DOC The ${PostgreSQL_INCLUDE_DIR_MESSAGE}
)

It works if I add postgresql to the PATH_SUFFIXES

- icholy

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FindPostgreSQL.cmake won't work on ubuntu

2012-12-17 Thread Matthew Woehlke

On 2012-12-17 14:55, Ilia Choly wrote:

I'm trying to get the `FindPostgreSQL` module to find
`/usr/include/postgresql/libpq-fe.h`.

This is the error I get:

 CMake Error at
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
(MESSAGE):
   Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR)
(found
   version 9.2.2)


Is pg_config in your PATH? (Do you have the necessary -dev package(s) 
installed?)


From a cursory look at the find module, it looks like having pg_config 
in your path should be all that is needed.


--
Matthew

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] FindPostgreSQL.cmake won't work on ubuntu

2012-12-17 Thread Rolf Eike Beer
Ilia Choly wrote:
 * Ubuntu 12.04
 * CMake 2.8.9
 * Postgresql 9.2.2

Maybe the usual multiarch breakage? http://cmake.org/Bug/view.php?id=13378

Eike
-- 


signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake