FindPostgreSQL.cmake won't work on ubuntu

前端 未结 4 1394
抹茶落季
抹茶落季 2021-02-07 14:44
  • Ubuntu 12.04
  • CMake 2.8.9
  • Postgresql 9.2.2

I\'m trying to get the FindPostgreSQL module to find /usr/include/postgre

4条回答
  •  面向向阳花
    2021-02-07 15:38

    On Ubuntu you can also work around that issue by calling cmake with having PostgreSQL_TYPE_INCLUDE_DIR defined like this:

    cmake -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/
    

    See the bug report [1] for this issue and a potential fix [2]. Álso see the discussion about the reasoning behind the move on the debian mailinglist at [3].

    On Ubuntu/Debian, starting with PostgreSQL 9.3 the header file pg_type.h is moved to a separate package (from libpq-dev to postgresql-server-dev) and consequently the file pg_type.h is moved to a new location

    • [1] https://gitlab.kitware.com/cmake/cmake/issues/17223
    • [2] https://gitlab.kitware.com/cmake/cmake/commit/d4fd30d8d8f5b9c4b5a110b4676cad2a19d7c314
    • [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314427

提交回复
热议问题