Skip to content

Commit

Permalink
Fix conan
Browse files Browse the repository at this point in the history
  • Loading branch information
fdr400 committed Jan 8, 2025
1 parent d1e00f7 commit e8a9e06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions postgresql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ else()
PROPERTIES COMPILE_FLAGS -DUSERVER_NO_LIBPQ_PATCHES=1
)

find_library(PostgreSQL_LIBRARY NAMES libpq.so libpq.dylib REQUIRED)
find_package(PostgreSQL REQUIRED)
if(USERVER_CONAN)
find_package(PostgreSQL REQUIRED CONFIG)
else()
find_library(PostgreSQL_LIBRARY NAMES libpq.so libpq.dylib REQUIRED)
find_package(PostgreSQL REQUIRED)
endif()
target_link_libraries(userver-libpq INTERFACE PostgreSQL::PostgreSQL)
endif()

Expand Down

0 comments on commit e8a9e06

Please sign in to comment.