Closed pahan76 closed 4 years ago
Same issue here. The find package configuratuion file of libpqxx seems not to be installed by vcpkg while other libraries like protobuf does not have such issue.
I have the same issue [though on alpine]
Hi @pahan76, you should use find_library
to find libpqxx. This is my CMakeLists.txt:
cmake_minimum_required (VERSION 3.9)
project (testpqxx C)
add_executable(testpqxx main.c)
find_path(LIBPQXX_INCLUDE_DIR pqxx)
find_library(LIBPQXX_LIBRARY liblibpqxx_static.a)
include_directories(${LIBPQXX_INCLUDE_DIR})
target_link_libraries(testpqxx PUBLIC ${LIBPQXX_LIBRARY})
Thanks for posting this issue. Please reopen this issue if it still be a problem for you.
@LilyWangL I'm sorry, but I don't think it is a common practice to use find_path
and find_library
directly instead of using a find_package
configuration file to find libpqxx
, nor it follows upstream's intention. Please reopen this issue and keep it open until a find_package
configuration file can be installed though VcPkg.
Package: libpqxx:x64-linux Vcpkg version: 2018.11.23-unknownhash
Output errors:
./CMakeLists.txt
src/CMakeLists.txt
Why package not found? How to link it well?