[cmake-developers] [CMake 0016008]: FindPostgreSQL.cmake return relative lib path

Mantis Bug Tracker mantis at public.kitware.com
Sun Mar 6 10:26:56 EST 2016


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=16008 
====================================================================== 
Reported By:                Egor P.
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16008
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2016-03-06 10:26 EST
Last Modified:              2016-03-06 10:26 EST
====================================================================== 
Summary:                    FindPostgreSQL.cmake return relative lib path
Description: 
Bottom of FindPostgreSQL.cmake:
---
if(PostgreSQL_FOUND)
  set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR}
${PostgreSQL_TYPE_INCLUDE_DIR} )
  set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
  set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
endif()
---

Value in ${PostgreSQL_LIBRARIES} is 'pq' or 'libpq' instead of absolute path.

And the page https://cmake.org/cmake/help/v3.0/command/link_directories.html
stated:
---
Note that this command is rarely necessary. Library locations returned by
find_package() and find_library() are absolute paths.
---

So, the return value probably should be
${PostgreSQL_LIBRARY_DIRS}/${PostgreSQL_LIBRARIES}
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-03-06 10:26 Egor P.        New Issue                                    
======================================================================



More information about the cmake-developers mailing list