When executing find_library in
find_library(PostgreSQL_LIBRARIES NAMES libpq.dll pq
NO_DEFAULT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_FIND_ROOT_PATH
it debug report indicate
find_library considered the following locations:
The item was found at
So it finds only static and ignores .dll.
If “pq” is removed , the library is not being found:
The item was not found despite valid file is there
Why is .dll ignored and how to force cmake to find it?