FindPostgreSQL.cmake nie będzie działać na ubuntu

Ubuntu 12.04CMake 2.8.9Postgresql 9.2.2

Próbuję zdobyćFindPostgreSQL moduł do znalezienia/usr/include/postgresql/libpq-fe.h.

Oto, co mam w moimCMakeLists.txt:

find_package(PostgreSQL REQUIRED)

To jest błąd, który otrzymuję:

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")
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindPostgreSQL.cmake:155 (find_package_handle_standard_args)
  CMakeLists.txt:7 (find_package)

Dodałem następujące wiersze przed wywołaniemfind_package ale to nie miało żadnego skutku.

set(PostgreSQL_ADDITIONAL_VERSIONS "9.2.2")
set(PostgreSQL_ADDITIONAL_SEARCH_PATHS ${PostgreSQL_ADDITIONAL_SEARCH_PATHS} "/usr/include/postgresql")

Próbowałem też googlowaćPostgreSQL_TYPE_INCLUDE_DIR ale nic nie znalazłem. Co jeszcze mogę spróbować?

questionAnswers(4)

yourAnswerToTheQuestion