FindPostgreSQL.cmake won't work on ubuntu

前端 未结 4 1379
抹茶落季
抹茶落季 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:32

    From Linux Mint 17.3 ("Rosa") with PostgreSQL 9.3, I had to adjust ilia choly's solution (interestingly, the suggested postgres entry in the list was already present in the file, but wasn't enough to fix things).

    I had to edit /usr/share/cmake-2.8/Modules/FindPostgreSQL.cmake around line 114 and add postgresql/9.3 so that the find_path call looks like

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

提交回复
热议问题