FindPostgreSQL: cmake 3.15 rc get_filename_component error
When using the cmake 3.15 rcs we noticed errors finding our postgres dependencies using: find_package(PostgreSQL REQUIRED)
The error returned was:
CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPostgreSQL.cmake:182 (get_filename_component):
get_filename_component unknown component
C:/Build/deps/vcpkg/installed/x64-windows/lib/libpq.lib
This works fine using cmake 3.14.5
Modifying FindPostgreSQL.cmake:182 from
get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
to
get_filename_component(PostgreSQL_LIBRARY_DIR "${PostgreSQL_LIBRARY}" PATH)
seems to resolve the issue
Edited by Brad King