mtangoo / wxDatabase

wxWidgets library for connecting to major relational database
http://mtangoo.github.io/database/index.html
36 stars 16 forks source link

CMake can't find PostgreSQL headers on Ubuntu/Debian #17

Closed patlkli closed 8 years ago

patlkli commented 8 years ago

On a standard Debian/Ubuntu, the pg_type.h header from the postgresql-server-dev-* packages aren't found by the FindPostgreSQL.cmake module, because they are in a different directory.

CMake Error at /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
  Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found
  version "9.4.5")
Call Stack (most recent call first):
  /usr/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.0/Modules/FindPostgreSQL.cmake:159 (find_package_handle_standard_args)
  CMakeLists.txt:104 (find_package)

This commit in CMake fixes this, but the version of CMake in the Debian repositories doesn't include that yet.

I suggest that in the meantime, we simply bundle the new FindPostgreSQL.cmake from that commit in the cmake/Modules directory together with the other find modules.

Let me know what you think, I have the commits ready to go.

mtangoo commented 8 years ago

I'll be great to see the fix. I can see Ubuntu is also affected by that!