libpqxx: win32 link ws2_32 dont work

from src/CMakeLists.txt line30

if(WIN32)
        target_link_libraries(${tgt} PUBLIC wsock32 ws2_32)
endif()

it didn’t work on ws2_32 it has to be added manually in project CMakeLists.txt

target_link_libraries(test pqxx libpq Ws2_32)

better to check it

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

the whole things done I got it save First thing first We need to set CMAKE_PREFIX_PATH or CMAKE_MODULE_PATH Manually in order to find The Package make sure the libpqxx-config.cmake exists in the path

Second since it’s called libpqxx::pqxx in the libpqxx-config.cmake it has to be libpqxx::pqxx when it comes to target_link_libraries And done,no more dependencies error

Recommend to add these in the first step of example