2

CMake module FindPostgreSQL.cmake that comes with Ubuntu and Debian have issues when you use find_package with PostGreSQL. We have a product that needs that and the best we can do is to ship our own version of FindPostgreSQL.cmake.

How can I then override CMake's FindPostgreSQL.cmake with our own without disturbing anything else? The project is found on this github repository

Community
  • 1
  • 1
Stefano Mtangoo
  • 6,017
  • 6
  • 47
  • 93

1 Answers1

1

I put them into cmake/modules directory of my project.

CMake searches for a file called Find<package>.cmake in the CMAKE_MODULE_PATH followed by the CMake installation. If the file is found, it is read and processed by CMake.

From CMake documentation find_package: https://cmake.org/cmake/help/v3.0/command/find_package.html

usr1234567
  • 21,601
  • 16
  • 108
  • 128