Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

FIX libpqxx not found problem #9768

Merged
merged 2 commits into from
Dec 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions plugins/blockvault_client_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ pkg_check_modules(pq IMPORTED_TARGET libpq>=10.0)
pkg_check_modules(pqxx IMPORTED_TARGET libpqxx>=6.0)

if (pqxx_FOUND)
add_library(blockvault postgres_backend.cpp)
target_include_directories(blockvault PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${pqxx_STATIC_INCLUDE_DIRS})

target_link_libraries(blockvault PUBLIC libpqxx.a PkgConfig::pq eosio_chain)
target_link_directories(blockvault PUBLIC ${pqxx_STATIC_LIBRARY_DIRS})
add_library(pqxx STATIC IMPORTED)
set_property(TARGET pqxx PROPERTY IMPORTED_LOCATION ${pqxx_STATIC_LIBRARY_DIRS}/libpqxx.a)
target_include_directories(pqxx INTERFACE ${pqxx_STATIC_INCLUDE_DIRS})
target_link_libraries(pqxx INTERFACE PkgConfig::pq)

add_library(blockvault postgres_backend.cpp)
target_include_directories(blockvault PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(blockvault PUBLIC pqxx eosio_chain)

target_link_libraries( blockvault_client_plugin blockvault)
target_compile_definitions(blockvault_client_plugin PRIVATE HAS_PQXX)
Expand Down